#! /usr/bin/env python
# encoding: utf-8
-# Thomas Nagy, 2016 (ita)
+# Thomas Nagy, 2016-2018 (ita)
import os, sys, traceback, base64, signal
try:
try:
TimeoutExpired = subprocess.TimeoutExpired
except AttributeError:
- class TimeoutExpired(object):
+ class TimeoutExpired(Exception):
pass
def run():
exc.stderr = err
raise exc
ret = proc.returncode
- except Exception ,e:
+ except Exception as e:
exc_type, exc_value, tb = sys.exc_info()
exc_lines = traceback.format_exception(exc_type, exc_value, tb)
trace = str(cmd) + '\n' + ''.join(exc_lines)
run()
except KeyboardInterrupt:
break
+