From: Boris Bobrov Date: Mon, 18 Aug 2014 00:07:02 +0000 (+0300) Subject: changes to BaseProcessingFail arguments usage X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a2608d6b59adc0377ad6eb6b30d596d0c9fa470c;p=mediagoblin.git changes to BaseProcessingFail arguments usage --- diff --git a/mediagoblin/processing/__init__.py b/mediagoblin/processing/__init__.py index 112b9d35..663d1bb5 100644 --- a/mediagoblin/processing/__init__.py +++ b/mediagoblin/processing/__init__.py @@ -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): """