summaryrefslogtreecommitdiffstats
path: root/debian/patches/0010-fix_ioerror_exception.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:50:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:50:22 +0000
commit4283a547939c204787a35239ff31758cccf2674f (patch)
tree961e298be9b22e950ab392515aa18ebb3de9bcd9 /debian/patches/0010-fix_ioerror_exception.patch
parentAdding upstream version 2.18+dfsg. (diff)
downloadirker-debian.tar.xz
irker-debian.zip
Adding debian version 2.18+dfsg-3.debian/2.18+dfsg-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/0010-fix_ioerror_exception.patch')
-rw-r--r--debian/patches/0010-fix_ioerror_exception.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0010-fix_ioerror_exception.patch b/debian/patches/0010-fix_ioerror_exception.patch
new file mode 100644
index 0000000..f9bfcee
--- /dev/null
+++ b/debian/patches/0010-fix_ioerror_exception.patch
@@ -0,0 +1,33 @@
+From: Neil Muller <drnlmuller+debian@gmail.com>
+Date: Sun, 13 May 2018 15:09:55 +0200
+Subject: Only HTTPError has a code attribute
+
+This would cause irker to crash in case we get a URLError instead of HTTPError,
+for example.
+
+Patch-Name: 0010-fix_ioerror_exception.patch
+Forwarded: https://gitlab.com/esr/irker/merge_requests/14
+---
+ irkerhook.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index 8bf46f8..d32b742 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
+