mirror of https://github.com/scrapy/scrapy.git
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…
Reference in New Issue