def repack_asar(): try: with Asar.from_path('./core') as a: with open('./core.asar', 'wb') as fp: a.fp.seek(0) fp.write(a.fp.read()) shutil.rmtree('./core') except Exception as e: print('ERROR: {0.__class__.__name__} {0}'.format(e))
def repack_asar(): try: with Asar.from_path("./core") as a: with open("./core.asar", "wb") as fp: a.fp.seek(0) fp.write(a.fp.read()) shutil.rmtree("./core") except Exception as e: print("ERROR: {0.__class__.__name__} {0}".format(e))