aboutsummaryrefslogtreecommitdiffstats
path: root/isodumper
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2020-06-13 08:18:14 +0200
committerPapoteur <papoteur@mageia.org>2020-06-13 08:18:14 +0200
commit6851d7dfbf8f3adc914495649a4604b0850124eb (patch)
tree31c5cae04b4e8b13af7a06c2d93ac0d1a833d565 /isodumper
parent479794a7041895deeceddc4ac0ec75f117817e06 (diff)
downloadisodumper-6851d7dfbf8f3adc914495649a4604b0850124eb.tar
isodumper-6851d7dfbf8f3adc914495649a4604b0850124eb.tar.gz
isodumper-6851d7dfbf8f3adc914495649a4604b0850124eb.tar.bz2
isodumper-6851d7dfbf8f3adc914495649a4604b0850124eb.tar.xz
isodumper-6851d7dfbf8f3adc914495649a4604b0850124eb.zip
Suppress YUI log from console (mga#26681) also with the launcher
Move version in Makefile : use 'make version' to have it in lib/version.py
Diffstat (limited to 'isodumper')
-rwxr-xr-xisodumper23
1 files changed, 18 insertions, 5 deletions
diff --git a/isodumper b/isodumper
index df1b890..e091e16 100755
--- a/isodumper
+++ b/isodumper
@@ -1,9 +1,22 @@
#!/usr/bin/python3
from isodumper import isodumper
+import manatools.args as args
+from isodumper import version
import yui
-app = isodumper.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()
+class ParseCLI(args.AppArgs):
+ def __init(self, command):
+ super().__init__(command)
+
+# Suppress YUI log from console (mga#26681)
+yui.YUILog.setLogFileName("/dev/null")
+
+parser = ParseCLI('isodumper')
+if parser.args.version:
+ print(version.RELEASE)
+else:
+ app = isodumper.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()