mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-23 05:04:00 +00:00
Fixed bug with deploy command if ~/.netrc doesn't exist. Closes #286
This commit is contained in:
parent
e1f419e9e9
commit
b3c96c698d
@ -171,7 +171,7 @@ def _add_auth_header(request, target):
|
||||
host = urlparse(target['url']).hostname
|
||||
a = netrc.netrc().authenticators(host)
|
||||
request.add_header('Authorization', basic_auth_header(a[0], a[2]))
|
||||
except (netrc.NetrcParseError, TypeError):
|
||||
except (netrc.NetrcParseError, IOError, TypeError):
|
||||
pass
|
||||
|
||||
def _http_post(request):
|
||||
|
Loading…
x
Reference in New Issue
Block a user