From 2f56270ded15b01431d6226272443119368395a1 Mon Sep 17 00:00:00 2001 From: Charley Peng Date: Sat, 24 May 2014 16:16:59 +1000 Subject: [PATCH] Fix geteuid not existing on Windows --- cheat/sheets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat/sheets.py b/cheat/sheets.py index bbcc373..c4da657 100644 --- a/cheat/sheets.py +++ b/cheat/sheets.py @@ -9,7 +9,7 @@ def default_path(): # the default path becomes confused when cheat is run as root, so fail # under those circumstances. (There is no good reason to need to run cheat # as root.) - if os.geteuid() == 0: + if os.name != 'nt' and os.geteuid() == 0: die('Please do not run this application as root.'); # determine the default cheatsheet dir