Raise a slightly useful exception when we can't find the media type.

This commit is contained in:
Christopher Allan Webber 2011-12-03 21:38:45 -06:00
parent a6f065632a
commit cc4f83faab

View File

@ -51,6 +51,10 @@ def get_media_manager(_media_type = None):
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):
for media_type, manager in get_media_managers():