Skip to content
Myr

Change ignore_errors to raise_errors in get_netrc_auth

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Pursehouse · committed by David Pursehouse · parent a560e09 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Change-Id: Ib82c7c614edafc15e5db858d9c1b9a73aebd8a95

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:requests/utils.py+3 added-3 removed
65 unmodified lines
66 # e.g. BytesIO, cStringIO.StringIO67 return len(o.getvalue())686970def get_netrc_auth(url, ignore_errors=True):70def get_netrc_auth(url, raise_errors=False):71 """Returns the Requests tuple auth for a given url from netrc."""7273 try:74 from netrc import netrc, NetrcParseError
29 unmodified lines
104 login_i = (0 if _netrc[0] else 1)105 return (_netrc[login_i], _netrc[2])106 except (NetrcParseError, IOError):107 # If there was a parsing error or a permissions issue reading the file,108 # we'll just skip netrc auth109 if not ignore_errors:108 # we'll just skip netrc auth unless explicitly asked to raise errors.109 if raise_errors:110 raise111112 # AppEngine hackiness.113 except (ImportError, AttributeError):
595 unmodified lines