Commits

Ronny Pfannschmidt committed 06667aa Merge

merge from default

Comments (0)

Files changed (1)

scripts/lodgeit.py

 def get_authenticated_url(url):
     import netrc, urlparse
     s = list(urlparse.urlsplit(url))
-    auth = netrc.netrc().authenticators(s[1])
+    try:
+        netrcfile = netrc.netrc()
+    except IOError:
+        return url
+    auth = netrcfile.authenticators(s[1])
     if not auth:
         return url
     s[1] = '%s:%s@%s' % (auth[0], auth[2], s[1])