Made changes to stop testcase if state.testmode
This commit is contained in:
parent
bf8c2f44f6
commit
05f49c352d
|
@ -325,7 +325,7 @@ class Main:
|
||||||
upnpThread = upnp.uPnPThread()
|
upnpThread = upnp.uPnPThread()
|
||||||
upnpThread.start()
|
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 state.curses == False:
|
||||||
if not depends.check_pyqt():
|
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('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')
|
||||||
|
@ -334,18 +334,22 @@ class Main:
|
||||||
|
|
||||||
import bitmessageqt
|
import bitmessageqt
|
||||||
bitmessageqt.run()
|
bitmessageqt.run()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if True:
|
if True:
|
||||||
# if depends.check_curses():
|
# if depends.check_curses():
|
||||||
print('Running with curses')
|
print('Running with curses')
|
||||||
import bitmessagecurses
|
import bitmessagecurses
|
||||||
bitmessagecurses.runwrapper()
|
bitmessagecurses.runwrapper()
|
||||||
|
elif state.testmode:
|
||||||
|
sleep(10)
|
||||||
|
self.stop()
|
||||||
else:
|
else:
|
||||||
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
|
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
|
||||||
|
|
||||||
if state.testmode:
|
# if state.testmode:
|
||||||
sleep(10)
|
# sleep(10)
|
||||||
self.stop()
|
# self.stop()
|
||||||
if daemon or state.testmode:
|
if daemon or state.testmode:
|
||||||
while state.shutdown == 0:
|
while state.shutdown == 0:
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
Reference in New Issue
Block a user