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:
parent
64516db02a
commit
a5583d981b
|
@ -15,7 +15,7 @@ from alert_processor import AlertProcessor
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
def setup_log_location(logdir):
|
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.")
|
raise FileNotFoundError(f"Log dir '{logdir}' does not exist. Be sure to create it first.")
|
||||||
log_location = os.path.join(logdir, "log")
|
log_location = os.path.join(logdir, "log")
|
||||||
status_location = os.path.join(logdir, "status")
|
status_location = os.path.join(logdir, "status")
|
||||||
|
|
Loading…
Reference in New Issue