From: Elrond Date: Tue, 13 Dec 2011 20:35:15 +0000 (+0100) Subject: Merge remote branch 'joar/b681-comments_from_reviewing_video' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8d52214f1e7b6d446fdf34fbfc8328f08eafbb1e;p=mediagoblin.git Merge remote branch 'joar/b681-comments_from_reviewing_video' * joar/b681-comments_from_reviewing_video: Bug 681 - Comments from reviewing the new video merge --- 8d52214f1e7b6d446fdf34fbfc8328f08eafbb1e diff --cc mediagoblin/media_types/__init__.py index 25f3d255,4fa56bc3..6f94c714 --- a/mediagoblin/media_types/__init__.py +++ b/mediagoblin/media_types/__init__.py @@@ -51,14 -60,14 +60,18 @@@ def get_media_manager(_media_type) if media_type in _media_type: return manager + # Nope? Then raise an error + raise FileTypeNotSupported( + "MediaManager not in enabled types. Check media_types in config?") + def get_media_type_and_manager(filename): + ''' + Get the media type and manager based on a filename + ''' for media_type, manager in get_media_managers(): if filename.find('.') > 0: + # Get the file extension ext = os.path.splitext(filename)[1].lower() else: raise InvalidFileType(