From 464b5b4f82266e1f0ac21f456a3b5af67a17e172 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 3 Apr 2018 22:26:58 +0200 Subject: [PATCH] Test mode fixes - don't test for pyqt in test mode - better exit (thanks @g1itch) --- src/bitmessagemain.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index f380d6e2..f3d69bac 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -325,12 +325,21 @@ class Main: upnpThread = upnp.uPnPThread() upnpThread.start() - if daemon == False and BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon') == False: + if daemon == False and BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon') == False and not state.testmode: if state.curses == False: if not depends.check_pyqt(): - print('PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon') - print('You can also run PyBitmessage with the new curses interface by providing \'-c\' as a commandline argument.') - sys.exit() + sys.exit( + 'PyBitmessage requires PyQt unless you want to' + ' run it as a daemon and interact with it using' + ' the API. You can download PyQt from' + ' http://www.riverbankcomputing.com/software/pyqt/download' + ' or by searching Google for \'PyQt Download\'.' + ' If you want to run in daemon mode, see' + ' https://bitmessage.org/wiki/Daemon\n' + 'You can also run PyBitmessage with the' + ' curses interface by providing \'-c\'' + ' as a commandline argument.' + ) import bitmessageqt bitmessageqt.run()