From: R David Murray Date: Wed, 18 Sep 2013 12:52:38 +0000 (-0400) Subject: #14984: only import pwd on POSIX. X-Git-Tag: 3.1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=505be2146fcee88b71899136a808173f588f9628;p=thirdparty%2FPython%2Fcpython.git #14984: only import pwd on POSIX. --- diff --git a/Lib/netrc.py b/Lib/netrc.py index 8fe4ceed4d74..2aa48f32cd50 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"]