From 1b03cc4586132b4cd44123823945b0f789675ac7 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Wed, 14 Dec 2022 12:26:34 +0200 Subject: [PATCH] Updated paths --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 500cf5f..4de7bf4 100755 --- a/main.py +++ b/main.py @@ -1,16 +1,15 @@ #!/usr/bin/env python3 import argparse import importlib -from pathlib import Path from detector.paths import BASE_PATH, create_dirs, LOGS_PATH from loguru import logger -log_level = "DEBUG" if Path.exists(Path.joinpath(BASE_PATH, "debug")) else "INFO" +log_level = "DEBUG" if BASE_PATH.joinpath("debug").exists() else "INFO" # Set up logging -logger.add(Path.joinpath(LOGS_PATH, "detection.log"), format="{time} | {level} | {message}", level=log_level, rotation="1 MB", compression="zip") +logger.add(LOGS_PATH.joinpath("detection.log"), format="{time} | {level} | {message}", level=log_level, rotation="1 MB", compression="zip") parser = argparse.ArgumentParser(description="Traffic light detection script.")