tests/hghave.py
changeset 1312 c44d24e2fc66
parent 1311 1fed120bfa04
child 1323 aeb658c7dbc7
--- a/tests/hghave.py	Wed Nov 20 12:55:08 2013 +0000
+++ b/tests/hghave.py	Thu Nov 28 12:59:05 2013 +0000
@@ -234,7 +234,7 @@
         os.rmdir(d)
 
 def has_root():
-    return os.geteuid() == 0
+    return getattr(os, 'geteuid', None) and os.geteuid() == 0
 
 def has_pyflakes():
     return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",