mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-10 18:39:41 +00:00
fix: REALLY fix <=3.12
This commit is contained in:
@@ -4,6 +4,7 @@ import shutil
|
||||
import zipfile
|
||||
import platform
|
||||
import subprocess
|
||||
from uuid import uuid4
|
||||
from typing import Optional
|
||||
from glob import glob, iglob
|
||||
from argparse import Namespace
|
||||
@@ -116,8 +117,11 @@ def delete_if_exists(path: str, bn: str) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
# damn it, literally EVERY FUCKING python version before 3.12 FUCKING SUCKS
|
||||
def extract_deb(deb: str, tweaks: dict[str, str], tmpdir: str) -> None:
|
||||
with TemporaryDirectory(prefix=tmpdir + "/", delete=False) as t2:
|
||||
t2 = f"{tmpdir}/{uuid4()}"
|
||||
os.mkdir(t2)
|
||||
|
||||
if platform.system() == "Linux":
|
||||
tool = ["ar", "-x", deb, f"--output={t2}"]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user