mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
refactor: move debug logging setup to the command execution block in CLI
This commit is contained in:
parent
cf8671655c
commit
3825b38fd8
1 changed files with 3 additions and 3 deletions
|
|
@ -60,9 +60,6 @@ if __name__ == "__main__":
|
|||
# Parse args
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.debug:
|
||||
logger.setLevel("DEBUG")
|
||||
|
||||
# Instantiate CLI
|
||||
cli = CLI()
|
||||
|
||||
|
|
@ -75,6 +72,9 @@ if __name__ == "__main__":
|
|||
elif args.command == "bans":
|
||||
ret, err = cli.bans()
|
||||
else:
|
||||
if args.debug:
|
||||
logger.setLevel("DEBUG")
|
||||
|
||||
ret, err = cli.custom(args.plugin_id, args.command, *args.arg, debug=args.debug)
|
||||
|
||||
if not ret:
|
||||
|
|
|
|||
Loading…
Reference in a new issue