From: R David Murray Date: Wed, 18 Sep 2013 12:49:25 +0000 (-0400) Subject: #14984: only import pwd on POSIX. X-Git-Tag: v2.6.9rc1~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e27eda32522777a41526c2f81c93889f6675ab7;p=python #14984: only import pwd on POSIX. --- diff --git a/Lib/netrc.py b/Lib/netrc.py index 2b45bc2518..ce6f4ddb97 100644 --- a/Lib/netrc.py +++ b/Lib/netrc.py @@ -2,7 +2,9 @@ # Module and documentation by Eric S. Raymond, 21 Dec 1998 -import os, stat, shlex, pwd +import os, stat, shlex +if os.name == 'posix': + import pwd __all__ = ["netrc", "NetrcParseError"]