From 57588afbe660c6888fba11c0e6aeae2afa7bfadc Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 17 Jan 2016 12:11:00 -0600 Subject: [PATCH] dispatch: wrap exceptions in str() before format() --- dr_botzo/dispatch/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr_botzo/dispatch/views.py b/dr_botzo/dispatch/views.py index faed9fe..dc12ef0 100644 --- a/dr_botzo/dispatch/views.py +++ b/dr_botzo/dispatch/views.py @@ -82,7 +82,7 @@ class DispatchMessage(generics.GenericAPIView): bot.privmsg(action.destination, text) except Exception as e: new_data = copy.deepcopy(message.data) - new_data['status'] = "FAILED - {0:s}".format(e) + new_data['status'] = "FAILED - {0:s}".format(str(e)) new_message = self.serializer_class(data=new_data) return Response(new_message.initial_data) elif action.type == DispatcherAction.FILE_TYPE: