Fixed bug with deploy command if ~/.netrc doesn't exist. Closes #286

This commit is contained in:
Pablo Hoffman 2010-11-13 16:38:30 -02:00
parent e1f419e9e9
commit b3c96c698d
1 changed files with 1 additions and 1 deletions

View File

@ -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):