Make kitchen.text.converters.exception_to_* not swallow

general errors such as KeyboardInterrupt
Bug: https://fedorahosted.org/kitchen/ticket/9

Patch-Name: explicit_Exception_catching
This commit is contained in:
Simon Chopin 2013-04-30 18:27:15 +02:00 committed by Sergio Durigan Junior
parent 7e18b88f80
commit a4a696f4da

View file

@ -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
@ -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