removed CompatMediaManager() since all core media_types are classes
authorRodney Ewing <ewing.rj@gmail.com>
Tue, 2 Jul 2013 00:23:47 +0000 (17:23 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Tue, 2 Jul 2013 14:22:02 +0000 (07:22 -0700)
mediagoblin/media_types/__init__.py

index 2ce66f2a3ceb8146218e7d881f7e123eda12da92..395ba17aa1c44077588d077f18b9d2e0b9f14cc8 100644 (file)
@@ -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