From 41986e12886f96b9d2d3b540f7c36497e648ccb3 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 18 Jun 2021 19:34:39 +0200 Subject: [PATCH] Try reporting a little more info from taskhandler deserialization error --- evennia/scripts/taskhandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/scripts/taskhandler.py b/evennia/scripts/taskhandler.py index ab1b29666d..3b826844a1 100644 --- a/evennia/scripts/taskhandler.py +++ b/evennia/scripts/taskhandler.py @@ -340,11 +340,11 @@ class TaskHandler(object): # an unsaveable callback should immediately abort try: dbserialize(callback) - except (TypeError, AttributeError, PickleError): + except (TypeError, AttributeError, PickleError) as err: 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 " - "instance method.".format(callback) + "instance method ({err}).".format(callback=callback, err=err) ) return