mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
fix: drop an unused import and make the build scripts' exits explicit
This commit is contained in:
@@ -32,7 +32,6 @@ import argparse
|
|||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -40,6 +39,7 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import zipfile
|
import zipfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import NoReturn
|
||||||
from xml.sax.saxutils import escape as xml_escape
|
from xml.sax.saxutils import escape as xml_escape
|
||||||
|
|
||||||
SCRIPTS = Path(__file__).resolve().parent
|
SCRIPTS = Path(__file__).resolve().parent
|
||||||
@@ -53,7 +53,7 @@ def step(msg: str) -> None:
|
|||||||
print(f"==> {msg}", flush=True)
|
print(f"==> {msg}", flush=True)
|
||||||
|
|
||||||
|
|
||||||
def fail(msg: str) -> None:
|
def fail(msg: str) -> NoReturn:
|
||||||
raise SystemExit(f"error: {msg}")
|
raise SystemExit(f"error: {msg}")
|
||||||
|
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ def resolve_apktool(arg: str | None) -> Path:
|
|||||||
root = sdk_root()
|
root = sdk_root()
|
||||||
if root and (root / "apktool.jar").exists():
|
if root and (root / "apktool.jar").exists():
|
||||||
return root / "apktool.jar"
|
return root / "apktool.jar"
|
||||||
fail("apktool.jar not found. Pass --apktool-jar or set APKTOOL_JAR.")
|
raise SystemExit("error: apktool.jar not found. Pass --apktool-jar or set APKTOOL_JAR.")
|
||||||
|
|
||||||
|
|
||||||
def cfg_value(config: Path, key: str) -> str | None:
|
def cfg_value(config: Path, key: str) -> str | None:
|
||||||
|
|||||||
+2
-1
@@ -28,6 +28,7 @@ import tempfile
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
import zipfile
|
import zipfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import NoReturn
|
||||||
|
|
||||||
REPO = Path(__file__).resolve().parent.parent
|
REPO = Path(__file__).resolve().parent.parent
|
||||||
CLIENT_MOD = REPO / "DorkNet.ClientMod"
|
CLIENT_MOD = REPO / "DorkNet.ClientMod"
|
||||||
@@ -50,7 +51,7 @@ def step(msg: str) -> None:
|
|||||||
print(f"==> {msg}", flush=True)
|
print(f"==> {msg}", flush=True)
|
||||||
|
|
||||||
|
|
||||||
def fail(msg: str) -> None:
|
def fail(msg: str) -> NoReturn:
|
||||||
raise SystemExit(f"error: {msg}")
|
raise SystemExit(f"error: {msg}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user