示例#1
0
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))
示例#2
0
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))