mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -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 json
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -40,6 +39,7 @@ import sys
|
||||
import tempfile
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from typing import NoReturn
|
||||
from xml.sax.saxutils import escape as xml_escape
|
||||
|
||||
SCRIPTS = Path(__file__).resolve().parent
|
||||
@@ -53,7 +53,7 @@ def step(msg: str) -> None:
|
||||
print(f"==> {msg}", flush=True)
|
||||
|
||||
|
||||
def fail(msg: str) -> None:
|
||||
def fail(msg: str) -> NoReturn:
|
||||
raise SystemExit(f"error: {msg}")
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ def resolve_apktool(arg: str | None) -> Path:
|
||||
root = sdk_root()
|
||||
if root and (root / "apktool.jar").exists():
|
||||
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:
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ import tempfile
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from typing import NoReturn
|
||||
|
||||
REPO = Path(__file__).resolve().parent.parent
|
||||
CLIENT_MOD = REPO / "DorkNet.ClientMod"
|
||||
@@ -50,7 +51,7 @@ def step(msg: str) -> None:
|
||||
print(f"==> {msg}", flush=True)
|
||||
|
||||
|
||||
def fail(msg: str) -> None:
|
||||
def fail(msg: str) -> NoReturn:
|
||||
raise SystemExit(f"error: {msg}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user