aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2020-12-09 18:02:56 +0100
committerPapoteur <papoteur@mageia.org>2020-12-09 18:02:56 +0100
commit8c6fc75a0613fb2fddcf0feaaf533205a3024c46 (patch)
treed78edb8853d4a2adc84c803a484f1409f2b478ef
parentdde2a5ea435fd5e4d01bf44dd5a5f54c1561a136 (diff)
downloadisodumper-8c6fc75a0613fb2fddcf0feaaf533205a3024c46.tar
isodumper-8c6fc75a0613fb2fddcf0feaaf533205a3024c46.tar.gz
isodumper-8c6fc75a0613fb2fddcf0feaaf533205a3024c46.tar.bz2
isodumper-8c6fc75a0613fb2fddcf0feaaf533205a3024c46.tar.xz
isodumper-8c6fc75a0613fb2fddcf0feaaf533205a3024c46.zip
Fix adding ~/.isodumper for logging when non present.
-rwxr-xr-xlib/isodumper.py5
1 files changed, 4 insertions, 1 deletions
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)