Debian Codegraph @

debian/patches/explicit_Exception_catching

raw
1 From 3500c7f4705840ba79b1b8f97ba48f95fc75325b Mon Sep 17 00:00:00 2001
2 From: Simon Chopin <[email protected]>
3 Date: Tue, 30 Apr 2013 18:27:15 +0200
4 Subject: Make kitchen.text.converters.exception_to_* not swallow
5
6 general errors such as KeyboardInterrupt
7 Bug: https://fedorahosted.org/kitchen/ticket/9
8
9 Patch-Name: explicit_Exception_catching
10 ---
11 kitchen2/kitchen/text/converters.py | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 diff --git a/kitchen2/kitchen/text/converters.py b/kitchen2/kitchen/text/converters.py
15 index eb518cb..d925313 100644
16 --- a/kitchen2/kitchen/text/converters.py
17 +++ b/kitchen2/kitchen/text/converters.py
18 @@ -499,7 +499,7 @@ def exception_to_unicode(exc, converters=EXCEPTION_CONVERTERS):
19 for func in converters:
20 try:
21 msg = func(exc)
22 - except:
23 + except Exception:
24 pass
25 else:
26 break
27 @@ -531,7 +531,7 @@ def exception_to_bytes(exc, converters=EXCEPTION_CONVERTERS):
28 for func in converters:
29 try:
30 msg = func(exc)
31 - except:
32 + except Exception:
33 pass
34 else:
35 break