@staticmethod
    def _archive_cls(file):
        cls = None
        if isinstance(file, six.string_types):
            filename = file
        else:
            try:
                filename = file.name
            except __HOLE__:
                raise UnrecognizedArchiveFormat(
                    "File object not a recognized archive format.")
        base, tail_ext = os.path.splitext(filename.lower())
        cls = extension_map.get(tail_ext)
        if not cls:
            base, ext = os.path.splitext(base)
            cls = extension_map.get(ext)
        if not cls:
            raise UnrecognizedArchiveFormat(
                "Path not a recognized archive format: %s" % filename)
        return cls
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/archive.py/Archive._archive_cls