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 <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2021-05-17 15:33:13 +00:00
parent 7bb9bbb732
commit 83e5f67256

View 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)