summaryrefslogtreecommitdiffstats
path: root/Lib/netrc.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-09-18 12:52:38 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-09-18 12:52:38 (GMT)
commit505be2146fcee88b71899136a808173f588f9628 (patch)
tree785f2c99baedf0c2427bbf57075b503c84cc47d9 /Lib/netrc.py
parent104aab956f6de4131cab800f742cc108f9f92edf (diff)
downloadcpython-505be2146fcee88b71899136a808173f588f9628.zip
cpython-505be2146fcee88b71899136a808173f588f9628.tar.gz
cpython-505be2146fcee88b71899136a808173f588f9628.tar.bz2
#14984: only import pwd on POSIX.
Diffstat (limited to 'Lib/netrc.py')
-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"]