Support debian version of python-magic along with pypi python-magic used
upstream.
--- a/src/eyed3/utils/__init__.py
+++ b/src/eyed3/utils/__init__.py
@@ -35,15 +35,28 @@
 ID3_MIME_TYPE_EXTENSIONS = (".id3", ".tag")
 
 
-class MagicTypes(magic.Magic):
-    def __init__(self):
-        magic.Magic.__init__(self, mime=True, mime_encoding=False,
-                             keep_going=False)
-
-    def guess_type(self, filename):
-        if os.path.splitext(filename)[1] in ID3_MIME_TYPE_EXTENSIONS:
-            return ID3_MIME_TYPE
-        return self.from_file(filename)
+# handle magic name conflict
+if hasattr(magic, 'from_file'):  # pypi python-magic
+    class MagicTypes(magic.Magic):
+        def __init__(self):
+            magic.Magic.__init__(self, mime=True, mime_encoding=False,
+                                 keep_going=False)
+
+        def guess_type(self, filename):
+            if os.path.splitext(filename)[1] in ID3_MIME_TYPE_EXTENSIONS:
+                return ID3_MIME_TYPE
+            return self.from_file(filename)
+else:                            # debian python-magic
+    class MagicTypes(object):
+        def __init__(self):
+            flags = magic.MIME_TYPE
+            self._magic = magic.open(flags)
+            self._magic.load()
+
+        def guess_type(self, filename):
+            if os.path.splitext(filename)[1] in ID3_MIME_TYPE_EXTENSIONS:
+                return ID3_MIME_TYPE
+            return self._magic.file(filename)
 
 
 _mime_types = MagicTypes()
