catch subprocess err in 3.9.x (dirty hack
This commit is contained in:
parent
b8a74fac97
commit
d244b1ba77
@ -91,10 +91,17 @@ class SubprocessPOW:
|
|||||||
def _spawn_proc(self):
|
def _spawn_proc(self):
|
||||||
"""Create a child proof of work process
|
"""Create a child proof of work process
|
||||||
wait for data and send shutdown signal when its found"""
|
wait for data and send shutdown signal when its found"""
|
||||||
parent_conn, child_conn = Pipe()
|
# The importerror started happening in 3.9.x
|
||||||
p = Process(target=self.do_pow, args=(child_conn,), daemon=True)
|
# not worth fixing because this POW will be replaced by VDF
|
||||||
p.start()
|
try:
|
||||||
#p.join()
|
parent_conn, child_conn = Pipe()
|
||||||
|
p = Process(target=self.do_pow, args=(child_conn,), daemon=True)
|
||||||
|
p.start()
|
||||||
|
except ImportError:
|
||||||
|
logger.error(
|
||||||
|
"Error in subprocess module when getting new POW " +
|
||||||
|
"pipe.\nThis is related to a problem in 3.9.x", terminal=True)
|
||||||
|
return
|
||||||
payload = None
|
payload = None
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user