From 8c6fc75a0613fb2fddcf0feaaf533205a3024c46 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Wed, 9 Dec 2020 18:02:56 +0100 Subject: Fix adding ~/.isodumper for logging when non present. --- lib/isodumper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/isodumper.py b/lib/isodumper.py index e43fda5..16e6804 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -577,7 +577,10 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog # TODO Read log level from command line level = logging.DEBUG if debug else logging.ERROR - logging.basicConfig(filename=os.path.join(os.path.expanduser('~'), '.isodumper',"isodumper2.log"), + logpath = os.path.join(os.path.expanduser('~'), '.isodumper') + if not (os.path.isdir(logpath)): + os.mkdir(logpath) + logging.basicConfig(filename=os.path.join(logpath,"isodumper2.log"), format='%(asctime)s %(levelname)-8s %(message)s', level=level) -- cgit v1.2.1