Try reporting a little more info from taskhandler deserialization error
This commit is contained in:
parent
95a2b18d43
commit
41986e1288
1 changed files with 3 additions and 3 deletions
|
|
@ -340,11 +340,11 @@ class TaskHandler(object):
|
||||||
# an unsaveable callback should immediately abort
|
# an unsaveable callback should immediately abort
|
||||||
try:
|
try:
|
||||||
dbserialize(callback)
|
dbserialize(callback)
|
||||||
except (TypeError, AttributeError, PickleError):
|
except (TypeError, AttributeError, PickleError) as err:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"the specified callback {} cannot be pickled. "
|
"the specified callback {callback} cannot be pickled. "
|
||||||
"It must be a top-level function in a module or an "
|
"It must be a top-level function in a module or an "
|
||||||
"instance method.".format(callback)
|
"instance method ({err}).".format(callback=callback, err=err)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue