do not show error message when it's not a exception
authorBoris Bobrov <breton@cynicmansion.ru>
Tue, 23 Feb 2016 01:03:27 +0000 (04:03 +0300)
committerBoris Bobrov <breton@cynicmansion.ru>
Tue, 23 Feb 2016 01:03:27 +0000 (04:03 +0300)
Gah, the previous patch was not enough! We cannot use text, we can only
use exception with a special attribute.

Lets return safe None for now an resolve this properly later, when we're
not in the freeze.

mediagoblin/db/mixin.py

index c8c5f95c13dbddb5aaf630fbfffdfd9410f9bff5..e8b121d071a124fe0d7ec0a8c40224bd0a6c54b6 100644 (file)
@@ -340,7 +340,7 @@ class MediaEntryMixin(GenerateSlugMixin, GeneratePublicIDMixin):
                 # we could show even some raw python things. Anyway, this
                 # should be properly resolved. Now we are in a freeze, that's
                 # why I simply catch ImportError.
-                return self.fail_error
+                return None
 
     def get_license_data(self):
         """Return license dict for requested license"""