dispatch: wrap exceptions in str() before format()

This commit is contained in:
Brian S. Stephan 2016-01-17 12:11:00 -06:00
parent b09c20e910
commit 57588afbe6
1 changed files with 1 additions and 1 deletions

View File

@ -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: