From 6851d7dfbf8f3adc914495649a4604b0850124eb Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 13 Jun 2020 08:18:14 +0200 Subject: 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 --- isodumper | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'isodumper') 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() -- cgit v1.2.1