From: Rodney Ewing Date: Tue, 2 Jul 2013 00:23:47 +0000 (-0700) Subject: removed CompatMediaManager() since all core media_types are classes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=90b7b6e878772061e416fc462273b8cc2e8dea5d;p=mediagoblin.git removed CompatMediaManager() since all core media_types are classes --- diff --git a/mediagoblin/media_types/__init__.py b/mediagoblin/media_types/__init__.py index 2ce66f2a..395ba17a 100644 --- a/mediagoblin/media_types/__init__.py +++ b/mediagoblin/media_types/__init__.py @@ -50,36 +50,6 @@ class MediaManagerBase(object): return hasattr(self, i) -class CompatMediaManager(object): - def __init__(self, mm_dict, entry=None): - self.mm_dict = mm_dict - self.entry = entry - - def __call__(self, entry): - "So this object can look like a class too, somehow" - assert self.entry is None - return self.__class__(self.mm_dict, entry) - - def __getitem__(self, i): - return self.mm_dict[i] - - def __contains__(self, i): - return (i in self.mm_dict) - - @property - def media_fetch_order(self): - return self.mm_dict.get('media_fetch_order') - - def sniff_handler(self, *args, **kwargs): - func = self.mm_dict.get("sniff_handler", None) - if func is not None: - return func(*args, **kwargs) - return False - - def __getattr__(self, i): - return self.mm_dict[i] - - def sniff_media(media): ''' Iterate through the enabled media types and find those suited