diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2017-02-12 12:27:45 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2017-02-12 12:27:45 +0000 |
commit | 1d4026b2fed8ed133ae370a7267cfdda3e09b34e (patch) | |
tree | d0b1fc35063b0a154b37d55e6c1c808b231200ca | |
parent | Merge branch 'feature/use_non-root_user_in_systemd' into 'master' (diff) | |
parent | Only HTTPError has a code attribute (diff) | |
download | irker-1d4026b2fed8ed133ae370a7267cfdda3e09b34e.tar.xz |
Merge branch 'master' into 'master'
Only HTTPError has a code attribute
See merge request !14
-rwxr-xr-x | irkerhook.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/irkerhook.py b/irkerhook.py index 9768eac..ce19446 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -95,12 +95,14 @@ class Commit: self.url = webview else: self.url = webview - except IOError as e: + except urllib2.HTTPError as e: if e.code == 401: # Authentication error, so we assume the view is valid self.url = webview else: self.url = "" + except IOError: + self.url = "" res = self.template % self.__dict__ return unicode(res, 'UTF-8') if not isinstance(res, unicode) else res |