diff --git a/sync/cli/Main.py b/sync/cli/Main.py index e9fc8ff..f59fee6 100644 --- a/sync/cli/Main.py +++ b/sync/cli/Main.py @@ -52,9 +52,6 @@ def exec(cls) -> int: parser = Parameters.generate_parser() cls._args = SafeArgs(parser.parse_args()) - if cls._args.debug: - os.environ["REPO_UTIL_DEBUG"] = "1" - code = cls._check_args() if code == cls.CODE_FAILURE: if cls._args.cmd is None: diff --git a/sync/cli/Parameters.py b/sync/cli/Parameters.py index d9ec699..7c9db37 100644 --- a/sync/cli/Parameters.py +++ b/sync/cli/Parameters.py @@ -414,12 +414,6 @@ def add_parser_env(cls, p, add_quiet=False): help="Show only error logs (piped through stderr)." ) - env.add_argument( - "--debug", - action="store_true", - help="Show full error stack, same as 'export REPO_UTIL_DEBUG=1'." - ) - return env @classmethod diff --git a/sync/error/Result.py b/sync/error/Result.py index e5002fa..69e9073 100644 --- a/sync/error/Result.py +++ b/sync/error/Result.py @@ -1,5 +1,3 @@ -import os -import traceback from typing import Optional, Any, Callable @@ -27,9 +25,6 @@ def wrapper(*args, **kwargs): value = func(*args, **kwargs) return Result(value=value) except BaseException as err: - if os.getenv("REPO_UTIL_DEBUG") == "1": - error_traceback = traceback.format_exc() - err = RuntimeError(error_traceback) return Result(error=err) return wrapper diff --git a/sync/model/LocalModule.py b/sync/model/LocalModule.py index 657aeda..e2a2ce7 100644 --- a/sync/model/LocalModule.py +++ b/sync/model/LocalModule.py @@ -1,4 +1,3 @@ -import os from zipfile import ZipFile from .AttrDict import AttrDict @@ -28,12 +27,7 @@ def load(cls, file): zipfile.read("META-INF/com/google/android/update-binary") except BaseException: - if os.getenv("REPO_UTIL_DEBUG") == "1": - filenames = [f.filename for f in zipfile.filelist] - msg = "\n".join(filenames) - else: - msg = f"{file.name} is not a magisk module" - + msg = f"{file.name} is not a magisk module" raise MagiskModuleError(msg) try: