From 93a17f16cac1364f25ac0937245e17cedd62fa5a Mon Sep 17 00:00:00 2001 From: Michael Ablassmeier Date: Wed, 9 Oct 2024 21:36:11 +0200 Subject: [PATCH] use variable instead of another call to os.path.dirname --- libqmpbackup/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libqmpbackup/lib.py b/libqmpbackup/lib.py index dcfe17b..89aa605 100644 --- a/libqmpbackup/lib.py +++ b/libqmpbackup/lib.py @@ -47,7 +47,7 @@ def setup_log(debug, logfile=None): if logfile: logpath = os.path.dirname(logfile) if logpath != "": - os.makedirs(os.path.dirname(logfile), exist_ok=True) + os.makedirs(logpath, exist_ok=True) handler.append(logging.FileHandler(logfile, mode="a")) logging.basicConfig(format=log_format, level=loglevel, handlers=handler) return logging.getLogger(__name__)