diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/nntplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py index d0bd5ad..8709fff 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -92,7 +92,7 @@ CRLF = '\r\n' # The class itself class NNTP: def __init__(self, host, port=NNTP_PORT, user=None, password=None, - readermode=None): + readermode=None, usenetrc=True): """Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) @@ -136,7 +136,7 @@ class NNTP: # If no login/password was specified, try to get them from ~/.netrc # Presume that if .netc has an entry, NNRP authentication is required. try: - if not user: + if usenetrc and not user: import netrc credentials = netrc.netrc() auth = credentials.authenticators(host) |