mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-11 02:49:40 +00:00
fix: REALLY fix <=3.12
This commit is contained in:
@@ -4,6 +4,7 @@ import shutil
|
|||||||
import zipfile
|
import zipfile
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from uuid import uuid4
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from glob import glob, iglob
|
from glob import glob, iglob
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
@@ -116,8 +117,11 @@ def delete_if_exists(path: str, bn: str) -> bool:
|
|||||||
return False
|
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:
|
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":
|
if platform.system() == "Linux":
|
||||||
tool = ["ar", "-x", deb, f"--output={t2}"]
|
tool = ["ar", "-x", deb, f"--output={t2}"]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user