Commit dcbb0242 authored by Denis Bilenko's avatar Denis Bilenko

testrunner: avoid "except:"

parent 3b4c4727
...@@ -129,7 +129,7 @@ class DatabaseTestResult(_TextTestResult): ...@@ -129,7 +129,7 @@ class DatabaseTestResult(_TextTestResult):
def format_exc_info(exc_info): def format_exc_info(exc_info):
try: try:
return '%s: %s' % (exc_info[0].__name__, exc_info[1]) return '%s: %s' % (exc_info[0].__name__, exc_info[1])
except: except Exception:
return str(exc_info[1]) or str(exc_info[0]) or 'FAILED' return str(exc_info[1]) or str(exc_info[0]) or 'FAILED'
...@@ -250,7 +250,7 @@ def run_subprocess(arg, options): ...@@ -250,7 +250,7 @@ def run_subprocess(arg, options):
if options.verbosity >= 2: if options.verbosity >= 2:
sys.stdout.write(data) sys.stdout.write(data)
retcode.append(popen.wait()) retcode.append(popen.wait())
except: except Exception:
popen.kill() popen.kill()
raise raise
finally: finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment