def disassemble(path, to, parser): print('\tD %s -> %s' % (path, to)) if(os.path.isfile(path)): dmi = None try: dmi = DMI(path) dmi.extractTo(to, parser.suppress_post_process) except SystemError as e: print("!!! Received SystemError in %s, halting: %s" % (dmi.filename, traceback.format_exc(e))) print('# of cells: %d' % len(dmi.states)) print('Image h/w: %s' % repr(dmi.size)) sys.exit(1) except Exception as e: print("Received error, continuing: %s" % traceback.format_exc())