From 83e5f672564a2fc91bb9e9492d227eaff70d8ba9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 17 May 2021 15:33:13 +0000 Subject: [PATCH] unbound-dhcp-leases-bridge: Fix exception when running without debug Fixes: https://bugzilla.ipfire.org/show_bug.cgi?id=12622 Fixes: #12622 Signed-off-by: Michael Tremer --- config/unbound/unbound-dhcp-leases-bridge | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/unbound/unbound-dhcp-leases-bridge b/config/unbound/unbound-dhcp-leases-bridge index 6f2b7ff359..a2df5f1014 100644 --- a/config/unbound/unbound-dhcp-leases-bridge +++ b/config/unbound/unbound-dhcp-leases-bridge @@ -571,12 +571,13 @@ if __name__ == "__main__": args = parser.parse_args() # Setup logging - if args.verbose == 1: - loglevel = logging.INFO - elif args.verbose >= 2: - loglevel = logging.DEBUG - else: - loglevel = logging.WARN + loglevel = logging.WARN + + if args.verbose: + if args.verbose == 1: + loglevel = logging.INFO + elif args.verbose >= 2: + loglevel = logging.DEBUG setup_logging(loglevel) -- 2.39.5