]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
unbound-dhcp-leases-bridge: Fix exception when running without debug
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 May 2021 15:33:13 +0000 (15:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 May 2021 15:33:13 +0000 (15:33 +0000)
Fixes: https://bugzilla.ipfire.org/show_bug.cgi?id=12622
Fixes: #12622
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/unbound/unbound-dhcp-leases-bridge

index 6f2b7ff35974c8d07ab024b4539fa7073e7f33dd..a2df5f10144151632fc80ce040a7fb424d6bea0f 100644 (file)
@@ -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)