Fallback to run_regular_process if we can't pickle arguments

This commit is contained in:
Gustavo Jose de Sousa 2016-06-27 15:53:25 -03:00
parent e52d1b4916
commit 9a0932951f
1 changed files with 4 additions and 1 deletions

View File

@ -821,7 +821,10 @@ def run_prefork_process(cmd, kwargs, cargs):
"""
Delegates process execution to a pre-forked process instance.
"""
obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs]))
try:
obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs]))
except TypeError:
return run_regular_process(cmd, kwargs, cargs)
proc = get_process()
if not proc: