diff options
author | Joar Wandborg <git@wandborg.com> | 2011-10-15 19:16:02 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2011-10-15 19:16:02 +0200 |
commit | 959b0df3983338d518bbef5349f5314d371af725 (patch) | |
tree | a0a34657921247d68a72cd04eb60859fdc4f8288 | |
parent | 363d774eea0018cc687a5f4b43c232ff3b08078a (diff) | |
download | mediagoblin-959b0df3983338d518bbef5349f5314d371af725.tar.lz mediagoblin-959b0df3983338d518bbef5349f5314d371af725.tar.xz mediagoblin-959b0df3983338d518bbef5349f5314d371af725.zip |
Image media exceptions
- Removed exception types specified in image.processing and included them from process_media.errors instead
-rw-r--r-- | mediagoblin/media_types/image/processing.py | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index 2c4ad2b1..57eb75db 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -24,6 +24,8 @@ from mediagoblin import mg_globals as mgg from mediagoblin.util import lazy_pass_to_ugettext as _ +from mediagoblin.process_media.errors import * + THUMB_SIZE = 180, 180 MEDIUM_SIZE = 640, 640 @@ -34,35 +36,6 @@ def create_pub_filepath(entry, filename): unicode(entry['_id']), filename]) - -class BaseProcessingFail(Exception): - """ - Base exception that all other processing failure messages should - subclass from. - - You shouldn't call this itself; instead you should subclass it - and provid the exception_path and general_message applicable to - this error. - """ - general_message = u'' - - @property - def exception_path(self): - return u"%s:%s" % ( - self.__class__.__module__, self.__class__.__name__) - - def __init__(self, **metadata): - self.metadata = metadata or {} - - -class BadMediaFail(BaseProcessingFail): - """ - Error that should be raised when an inappropriate file was given - for the media type specified. - """ - general_message = _(u'Invalid file given for media type.') - - ################################ # Media processing initial steps ################################ |