From 884cb7a7fbaea704427ed878dfbdeae3744c9e71 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 29 Jun 2015 12:22:57 +0900 Subject: [PATCH] Change ignore_errors to raise_errors in get_netrc_auth Change-Id: Ib82c7c614edafc15e5db858d9c1b9a73aebd8a95 --- requests/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requests/utils.py b/requests/utils.py index db841a36..3fd0e41f 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -67,7 +67,7 @@ def super_len(o): return len(o.getvalue()) -def get_netrc_auth(url, ignore_errors=True): +def get_netrc_auth(url, raise_errors=False): """Returns the Requests tuple auth for a given url from netrc.""" try: @@ -105,8 +105,8 @@ def get_netrc_auth(url, ignore_errors=True): return (_netrc[login_i], _netrc[2]) except (NetrcParseError, IOError): # If there was a parsing error or a permissions issue reading the file, - # we'll just skip netrc auth - if not ignore_errors: + # we'll just skip netrc auth unless explicitly asked to raise errors. + if raise_errors: raise # AppEngine hackiness.