From b3c96c698defe87f826713c4e9b90683ae21f41e Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Sat, 13 Nov 2010 16:38:30 -0200 Subject: [PATCH] Fixed bug with deploy command if ~/.netrc doesn't exist. Closes #286 --- scrapy/commands/deploy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/commands/deploy.py b/scrapy/commands/deploy.py index a8c546de1..84b545420 100644 --- a/scrapy/commands/deploy.py +++ b/scrapy/commands/deploy.py @@ -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):