]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/unbound/unbound-dhcp-leases-bridge
unbound-dhcp-leases-bridge: Fix exception when running without debug
[ipfire-2.x.git] / 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)