mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use os.geteuid() for checking whether we are root, as suggested by
Michael Hudson.
This commit is contained in:
parent
eb68be465f
commit
6b220b0355
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ class TestShutil(unittest.TestCase):
|
|||
# See bug #1071513 for why we don't run this on cygwin
|
||||
# and bug #1076467 for why we don't run this as root.
|
||||
if (hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin'
|
||||
and os.getenv('USER') != 'root'):
|
||||
and not (hasattr(os, 'geteuid') and os.geteuid() == 0)):
|
||||
def test_on_error(self):
|
||||
self.errorState = 0
|
||||
os.mkdir(TESTFN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue