[Python-checkins] cpython (merge 3.2 -> 3.3): Merge #14984: only import pwd on POSIX.

r.david.murray python-checkins at python.org
Wed Sep 18 15:00:23 CEST 2013


http://hg.python.org/cpython/rev/b8206cb2c4ee
changeset:   85753:b8206cb2c4ee
branch:      3.3
parent:      85746:68e5e416e8af
parent:      85752:ef90c40fe6cf
user:        R David Murray <rdmurray at bitdance.com>
date:        Wed Sep 18 08:54:00 2013 -0400
summary:
  Merge #14984: only import pwd on POSIX.

files:
  Lib/netrc.py |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/netrc.py b/Lib/netrc.py
--- 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"]
 

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


More information about the Python-checkins mailing list