Skip to content

Commit

Permalink
use variable instead of another call to os.path.dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Oct 9, 2024
1 parent 19aa773 commit 93a17f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libqmpbackup/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit 93a17f1

Please sign in to comment.