kitchen/debian/patches/explicit_Exception_catching

36 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-07-08 23:30:59 +00:00
From a4a696f4dafa6b13c3898d01acafcf958956eb1f Mon Sep 17 00:00:00 2001
From: Simon Chopin <chopin.simon@gmail.com>
Date: Tue, 30 Apr 2013 18:27:15 +0200
2015-10-08 16:26:24 +00:00
Subject: Make kitchen.text.converters.exception_to_* not swallow
general errors such as KeyboardInterrupt
Bug: https://fedorahosted.org/kitchen/ticket/9
2015-10-08 16:26:24 +00:00
Patch-Name: explicit_Exception_catching
---
2016-07-08 23:30:59 +00:00
kitchen2/kitchen/text/converters.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
2016-07-08 23:30:59 +00:00
diff --git a/kitchen2/kitchen/text/converters.py b/kitchen2/kitchen/text/converters.py
index eb518cb..d925313 100644
--- a/kitchen2/kitchen/text/converters.py
+++ b/kitchen2/kitchen/text/converters.py
@@ -499,7 +499,7 @@ def exception_to_unicode(exc, converters=EXCEPTION_CONVERTERS):
for func in converters:
try:
msg = func(exc)
- except:
+ except Exception:
pass
else:
break
2016-07-08 23:30:59 +00:00
@@ -531,7 +531,7 @@ def exception_to_bytes(exc, converters=EXCEPTION_CONVERTERS):
for func in converters:
try:
msg = func(exc)
- except:
+ except Exception:
pass
else:
break