def do_repos_cache(self, args): if self.repos_cache and not args: print self.repos_cache return self.repos_cache = args if args else get_repos_cache() set_repos_cache(self.repos_cache)
def __init__(self, uri, repos_cache=None): ''' @type uri: str @param uri: repository location eg: http://www.example.com/repo @type repos_cache: str/None @param repos_cache: directory to store the modules downloaded from the repository. If not specified uses the global repos location. (get_repos_cache()) ''' self.uri = uri if not get_repos_cache() and repos_cache: set_repos_cache(repos_cache) self.cache = repos_cache or get_repos_cache() if not self.cache: raise RepositoryException('Repos location not known')