summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-09-18 12:54:00 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-09-18 12:54:00 (GMT)
commit4b49ae61d8b67c62c8c937907789cf9df95519ec (patch)
tree72d4e16d03b6a33ef72622a1c1e15573645e7f8a
parent41a22f1a778b87dee7b848c110a82e0a5b85208f (diff)
parent58bf8d2a688cf0fe180ed929568d0294a32ef5de (diff)
downloadcpython-4b49ae61d8b67c62c8c937907789cf9df95519ec.zip
cpython-4b49ae61d8b67c62c8c937907789cf9df95519ec.tar.gz
cpython-4b49ae61d8b67c62c8c937907789cf9df95519ec.tar.bz2
Merge #14984: only import pwd on POSIX.
-rw-r--r--Lib/netrc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/netrc.py b/Lib/netrc.py
index 8fe4cee..2aa48f3 100644
--- a/Lib/netrc.py
+++ b/Lib/netrc.py
@@ -2,7 +2,9 @@
# Module and documentation by Eric S. Raymond, 21 Dec 1998
-import io, os, shlex, stat, pwd
+import os, shlex, stat
+if os.name == 'posix':
+ import pwd
__all__ = ["netrc", "NetrcParseError"]