From efcb6ca32c7a84231221d5f390bf79850bfaffe6 Mon Sep 17 00:00:00 2001 From: MoYoez Date: Thu, 19 Oct 2023 18:23:38 +0800 Subject: [PATCH] fix:env err --- gameInformation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gameInformation.py b/gameInformation.py index cb0a37b..af9a985 100644 --- a/gameInformation.py +++ b/gameInformation.py @@ -10,7 +10,6 @@ # download gameinformation from -env = Environment() filename = sys.argv[1].split("/")[-1] @@ -67,6 +66,7 @@ def readSchema(self, schema: dict): def run(path): + env = Environment() with zipfile.ZipFile(path) as apk: with apk.open("assets/bin/Data/globalgamemanagers.assets") as f: env.load_file(f.read(), name="assets/bin/Data/globalgamemanagers.assets") @@ -150,5 +150,7 @@ def run(path): for data in response.iter_content(chunk_size=1024): size = file.write(data) bar.update(size) - run(filename) - os.delete(filename) + + +run(filename) +os.remove(filename)