Removed try and except for the testcases in bitmessagemain
This commit is contained in:
parent
38194071c6
commit
a16f2c6deb
|
@ -158,7 +158,7 @@ def signal_handler(signum, frame):
|
||||||
if "PoolWorker" in process.name:
|
if "PoolWorker" in process.name:
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
if thread.name not in ("PyBitmessage", "MainThread"):
|
if thread.name not in ("PyBitmessage", "MainThread"):
|
||||||
return
|
return
|
||||||
logger.error("Got signal %i", signum)
|
logger.error("Got signal %i", signum)
|
||||||
# there are possible non-UI variants to run bitmessage
|
# there are possible non-UI variants to run bitmessage
|
||||||
# which should shutdown especially test-mode
|
# which should shutdown especially test-mode
|
||||||
|
@ -405,20 +405,18 @@ class Main(object):
|
||||||
else:
|
else:
|
||||||
state.enableGUI = True
|
state.enableGUI = True
|
||||||
# pylint: disable=relative-import
|
# pylint: disable=relative-import
|
||||||
try:
|
|
||||||
from tests import core as test_core
|
from tests import core as test_core
|
||||||
test_core_result = test_core.run()
|
test_core_result = test_core.run()
|
||||||
state.enableGUI = True
|
state.enableGUI = True
|
||||||
self.stop()
|
self.stop()
|
||||||
test_core.cleanup()
|
test_core.cleanup()
|
||||||
sys.exit(
|
sys.exit(
|
||||||
'Core tests failed!'
|
'Core tests failed!'
|
||||||
if test_core_result.errors or test_core_result.failures
|
if test_core_result.errors or test_core_result.failures
|
||||||
else 0
|
else 0
|
||||||
)
|
)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def daemonize():
|
def daemonize():
|
||||||
"""Running as a daemon. Send signal in end."""
|
"""Running as a daemon. Send signal in end."""
|
||||||
|
@ -465,12 +463,9 @@ class Main(object):
|
||||||
si = open(os.devnull)
|
si = open(os.devnull)
|
||||||
so = open(os.devnull, 'a+')
|
so = open(os.devnull, 'a+')
|
||||||
se = open(os.devnull, 'a+')
|
se = open(os.devnull, 'a+')
|
||||||
try:
|
os.dup2(si.fileno(), sys.stdin.fileno())
|
||||||
os.dup2(si.fileno(), sys.stdin.fileno())
|
os.dup2(so.fileno(), sys.stdout.fileno())
|
||||||
os.dup2(so.fileno(), sys.stdout.fileno())
|
os.dup2(se.fileno(), sys.stderr.fileno())
|
||||||
os.dup2(se.fileno(), sys.stderr.fileno())
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
if parentPid:
|
if parentPid:
|
||||||
# signal ready
|
# signal ready
|
||||||
os.kill(parentPid, signal.SIGTERM)
|
os.kill(parentPid, signal.SIGTERM)
|
||||||
|
|
Reference in New Issue
Block a user