Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Remove debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SanmerDev committed Oct 21, 2023
1 parent 55b8c38 commit 302d483
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
3 changes: 0 additions & 3 deletions sync/cli/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions sync/cli/Parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions sync/error/Result.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import traceback
from typing import Optional, Any, Callable


Expand Down Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions sync/model/LocalModule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from zipfile import ZipFile

from .AttrDict import AttrDict
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 302d483

Please sign in to comment.