From: Michael Tremer Date: Mon, 17 May 2021 15:33:13 +0000 (+0000) Subject: unbound-dhcp-leases-bridge: Fix exception when running without debug X-Git-Tag: v2.25-core157~12^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83e5f672564a2fc91bb9e9492d227eaff70d8ba9;p=ipfire-2.x.git 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 --- 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)