Commit de14f4fd authored by Brenden Blanco's avatar Brenden Blanco

Fix python3 exception when ctrl-c tools/trace.py

The way to do exception printing in python2/3 compatible way is using
sys.exc_info()[0/1].
parent 5a0dbcf8
......@@ -545,8 +545,8 @@ trace 'u:pthread:pthread_create (arg4 != 0)'
except:
if self.args.verbose:
traceback.print_exc()
elif sys.exc_type is not SystemExit:
print(sys.exc_value)
elif sys.exc_info()[0] is not SystemExit:
print(sys.exc_info()[1])
self._close_probes()
if __name__ == "__main__":
......
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