def __init__(self,
                 info_files,
                 fetcher=None,
                 local_info=None,
                 remote_info=None,
                 remote_git_info=None,
                 cache_ttl=3600,
                 cache_base_path=None):
        """
        Specify distroinfo instance to query.

        :param info_files: info file name or a list of file names
        :param fetcher: custom info fetcher,
                        implementation of distroinfo.fetch.InfoFetcher,
                        you can use *_info params instead for builtins
        :param local_info: a shortcut to use LocalInfoFetcher
        :param remote_info: a shortcut to use RemoteRawInfoFetcher
        :param remote_git_info: a shortcut use RemoteGitInfoFetcher
        """
        if fetcher:
            self.fetcher = fetcher
        else:
            # convenience shortcuts to builtin info fetchers
            if local_info:
                self.fetcher = fetch.LocalInfoFetcher(local_info)
            elif remote_info:
                self.fetcher = fetch.RemoteInfoFetcher(
                    remote_info,
                    cache_ttl=cache_ttl,
                    cache_base_path=cache_base_path)
            elif remote_git_info:
                self.fetcher = fetch.RemoteGitInfoFetcher(
                    remote_git_info,
                    cache_ttl=cache_ttl,
                    cache_base_path=cache_base_path)
            else:
                raise exception.InfoFetcherRequired()
        self.fetcher.di_class = DistroInfo
        self.info_files = info_files

        if isinstance(self.info_files, six.string_types):
            # support both a single file and a list
            self.info_files = [self.info_files]
def __init__ ( self , info_files , fetcher = None , local_info = None , remote_info = None , remote_git_info = None , cache_ttl = 3600 , cache_base_path = None ) : if fetcher : self . fetcher = fetcher else : if local_info : self . fetcher = fetch . LocalInfoFetcher ( local_info ) elif remote_info : self . fetcher = fetch . RemoteInfoFetcher ( remote_info , cache_ttl = cache_ttl , cache_base_path = cache_base_path ) elif remote_git_info : self . fetcher = fetch . RemoteGitInfoFetcher ( remote_git_info , cache_ttl = cache_ttl , cache_base_path = cache_base_path ) else : raise exception . InfoFetcherRequired ( ) self . fetcher . di_class = DistroInfo self . info_files = info_files if isinstance ( self . info_files , six . string_types ) : self . info_files = [ self . info_files ]
Specify distroinfo instance to query.

        :param info_files: info file name or a list of file names
        :param fetcher: custom info fetcher,
                        implementation of distroinfo.fetch.InfoFetcher,
                        you can use *_info params instead for builtins
        :param local_info: a shortcut to use LocalInfoFetcher
        :param remote_info: a shortcut to use RemoteRawInfoFetcher
        :param remote_git_info: a shortcut use RemoteGitInfoFetcher