diff --git a/requests/utils.py b/requests/utils.py index 68efa469..106c7d89 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -50,7 +50,9 @@ def get_netrc_auth(url): # Return with login / password login_i = (0 if _netrc[0] else 1) return (_netrc[login_i], _netrc[2]) - except NetrcParseError: + except NetrcParseError, IOError: + # If there was a parsing error or a permissions issue reading the file, + # we'll just skip netrc auth pass