Skip to content

Instantly share code, notes, and snippets.

@exarkun
Created September 7, 2017 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exarkun/2ad27ecd63acccdc53511ef2e6137157 to your computer and use it in GitHub Desktop.
Save exarkun/2ad27ecd63acccdc53511ef2e6137157 to your computer and use it in GitHub Desktop.
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