gui: do not add a console logger when there is no sys.stdout
Change-Id: Icfd39bd508b5d482c902e6e781cbc557085b0c2e Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34829 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
This commit is contained in:
parent
c3a87e43be
commit
56c7bbc831
@ -64,9 +64,10 @@ def main(argv=None):
|
|||||||
loglevel = logging.DEBUG if args.debug else (logging.ERROR if args.quiet else logging.INFO)
|
loglevel = logging.DEBUG if args.debug else (logging.ERROR if args.quiet else logging.INFO)
|
||||||
logger = logging.getLogger('gui')
|
logger = logging.getLogger('gui')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
console = ColoredConsoleHandler()
|
if sys.stdout is not None:
|
||||||
console.setLevel(loglevel)
|
console = ColoredConsoleHandler()
|
||||||
logger.addHandler(console)
|
console.setLevel(loglevel)
|
||||||
|
logger.addHandler(console)
|
||||||
|
|
||||||
app = QApplication(argv)
|
app = QApplication(argv)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user