aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-03-16 07:17:29 +0100
committerPapoteur <papoteur@mageia.org>2018-03-16 11:17:42 +0100
commita35909768856868dd165172b17d2aa2c8aaa7089 (patch)
tree2496543db26823dae40a0a9737ce1d6a0600246f /lib
parent134d42f2f83dc82fb9188283d91918e72a51b4d2 (diff)
downloadisodumper-a35909768856868dd165172b17d2aa2c8aaa7089.tar
isodumper-a35909768856868dd165172b17d2aa2c8aaa7089.tar.gz
isodumper-a35909768856868dd165172b17d2aa2c8aaa7089.tar.bz2
isodumper-a35909768856868dd165172b17d2aa2c8aaa7089.tar.xz
isodumper-a35909768856868dd165172b17d2aa2c8aaa7089.zip
Manage exiting as module or as application
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 60d2341..9d861ed 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -367,10 +367,10 @@ class IsoDumper(object):
def close(self):
self.write_logfile()
self.dialog.destroy()
- #exit(0)
+ self.dialog = None
def write_logfile(self):
- logpath = os.path.join(os.path.expanduser('~'),'/.isodumper')
+ logpath = os.path.join(os.path.expanduser('~'),'.isodumper')
if not(os.path.isdir(logpath)):
os.mkdir(logpath)
logfile=open(logpath+'/isodumper.log',"w", encoding="utf-8")
@@ -679,14 +679,15 @@ NTFS or ext. You can specify a volume name and the format in a new dialog box.<B
def run(self):
try:
self.handleevent()
- except:
+ except Exception as e:
+ print(str(e))
yui.YDialog.deleteAllDialogs()
- finally:
- # next line seems to be a workaround to prevent the qt-app from crashing
- # see https://github.com/libyui/libyui-qt/issues/41
- yui.YUILoader.deleteUI()
+
if __name__ == "__main__":
app = IsoDumper()
app.run()
+ # next line seems to be a workaround to prevent the qt-app from crashing
+ # see https://github.com/libyui/libyui-qt/issues/41
+ yui.YUILoader.deleteUI()