Update extractWSA.py

This commit is contained in:
Alessandro 2022-08-21 22:30:32 +02:00 committed by GitHub
parent 289088134c
commit 29d55d7a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,9 +24,11 @@ with zipfile.ZipFile(Path.cwd().parent / "download/wsa.zip") as zip:
for f in zip.filelist:
if arch in f.filename.lower():
zip_name = f.filename
output_name = zip_name[11:-5]
print(output_name)
if not os.path.isfile(workdir / zip_name):
zip_path = workdir / zip_name
print(f"unzipping to {workdir}", flush=True)
#print(f"unzipping to {workdir}", flush=True)
zip.extract(f, workdir)
ver_no = zip_name.split("_")
long_ver = ver_no[1]
@ -53,7 +55,7 @@ with zipfile.ZipFile(Path.cwd().parent / "download/wsa.zip") as zip:
l.extract(g, workdir / 'xml')
with zipfile.ZipFile(zip_path) as zip:
if not os.path.isdir(workdir / arch):
print(f"unzipping from {zip_path}", flush=True)
#print(f"unzipping from {zip_path}", flush=True)
zip.extractall(workdir / arch)
print("done", flush=True)
#print("done", flush=True)