Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a different theseus exception
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$ python -m TheseusHook -o /tmp/theseus.stats $(type -p tahoe) --help
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function remove at 0x7f210e8b2668> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7f210e5be1b8> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7f2112edfb90> ignored
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$ cat TheseusHook.py
import runpy
def main():
from sys import argv
assert argv[1] == b"-o"
outpath = argv[2]
del argv[:3]
from theseus import Tracer
t = Tracer()
t.install()
try:
runpy.run_path(argv[0])
finally:
with open(outpath, "wb") as trace_file:
t.write_data(trace_file)
if __name__ == '__main__':
main()
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$ python -m TheseusHook -o /tmp/theseus.stats $(type -p tahoe) --help
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function remove at 0x7fe12a7f4668> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7fe12a5001b8> ignored
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <function _remove at 0x7fe12ee21b90> ignored
(leastauthority.com) exarkun@baryon:~/Work/LeastAuthority/leastauthority.com/docker$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment