changes to BaseProcessingFail arguments usage
authorBoris Bobrov <breton@cynicmansion.ru>
Mon, 18 Aug 2014 00:07:02 +0000 (03:07 +0300)
committerBoris Bobrov <breton@cynicmansion.ru>
Sun, 31 Jan 2016 23:30:32 +0000 (00:30 +0100)
mediagoblin/processing/__init__.py

index 112b9d359610011dcd5c2080e15563fb5e550c17..663d1bb5dc54b3a8790168636cef545fc7b533d3 100644 (file)
@@ -408,8 +408,11 @@ class BaseProcessingFail(Exception):
         return u"%s:%s" % (
             self.__class__.__module__, self.__class__.__name__)
 
-    def __init__(self, **metadata):
-        self.metadata = metadata or {}
+    def __init__(self, message=None, **metadata):
+        if message is not None:
+            super(BaseProcessingFail, self).__init__(message)
+            metadata['message'] = message
+        self.metadata = metadata
 
 class BadMediaFail(BaseProcessingFail):
     """