Update log directory check in setup_log_location function

* Updated the condition to check if the log directory exists by using Path(logdir).is_dir() instead of Path.is_dir(logdir).
This commit is contained in:
Sam 2024-02-16 12:36:05 +00:00
parent 64516db02a
commit a5583d981b
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ from alert_processor import AlertProcessor
logger = logging.getLogger()
def setup_log_location(logdir):
if not Path.is_dir(logdir):
if not Path(logdir).is_dir():
raise FileNotFoundError(f"Log dir '{logdir}' does not exist. Be sure to create it first.")
log_location = os.path.join(logdir, "log")
status_location = os.path.join(logdir, "status")