Commit 7c572215 authored by Victor Stinner's avatar Victor Stinner

Issue #19544, #6516: no need to catch AttributeError on import pwd/grp

parent 53ae4bd7
...@@ -20,12 +20,12 @@ from distutils import log ...@@ -20,12 +20,12 @@ from distutils import log
try: try:
from pwd import getpwnam from pwd import getpwnam
except (ImportError, AttributeError): except ImportError:
getpwnam = None getpwnam = None
try: try:
from grp import getgrnam from grp import getgrnam
except (ImportError, AttributeError): except ImportError:
getgrnam = None getgrnam = None
def _get_gid(name): def _get_gid(name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment