[Python-checkins] cpython (merge 3.2 -> default): os.geteuid() may not be available...

charles-francois.natali python-checkins at python.org
Tue Oct 4 23:34:47 CEST 2011


http://hg.python.org/cpython/rev/08dd0f9b79fa
changeset:   72681:08dd0f9b79fa
parent:      72675:971093a75613
parent:      72680:7a2127ca6c8a
user:        Charles-François Natali <neologix at free.fr>
date:        Tue Oct 04 23:36:49 2011 +0200
summary:
  os.geteuid() may not be available...

files:
  Lib/test/test_import.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -545,7 +545,7 @@
 
     @unittest.skipUnless(os.name == 'posix',
                          "test meaningful only on posix systems")
-    @unittest.skipIf(os.geteuid() == 0,
+    @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
             "due to varying filesystem permission semantics (issue #11956)")
     def test_unwritable_directory(self):
         # When the umask causes the new __pycache__ directory to be

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list