def __get_url_and_cache_path_list(self): url_and_cache_path_list = list() url = None cache_path = None for item in self.__repositories: repository = Glo.get_repository(item) if len(repository) == Glo.ONE_TUPLE: url = repository[0] cache_path = '~/buildc_libs/' cache_path += url[str(url).rfind('/')+1:] cache_path = os.path.abspath(os.path.expanduser(cache_path)) elif len(repository) == Glo.TWO_TUPLE or len(repository) == Glo.THREE_TUPLE: (url, cache_path) = (repository[0], repository[1]) cache_path = os.path.abspath(os.path.expanduser(cache_path)) else: print 'tuple number invalid in .buildc.rc' sys.exit(Errors.tuple_number_invalid) url_and_cache_path_list.append((url, cache_path)) return url_and_cache_path_list
def __get_url_and_cache_path_list(self): url_and_cache_path_list = list() url = None cache_path = None for item in self.__repositories: repository = Glo.get_repository(item) if len(repository) == Glo.ONE_TUPLE: url = repository[0] cache_path = '~/buildc_libs/' cache_path += url[str(url).rfind('/') + 1:] cache_path = os.path.abspath(os.path.expanduser(cache_path)) elif len(repository) == Glo.TWO_TUPLE or len( repository) == Glo.THREE_TUPLE: (url, cache_path) = (repository[0], repository[1]) cache_path = os.path.abspath(os.path.expanduser(cache_path)) else: print 'tuple number invalid in .buildc.rc' sys.exit(Errors.tuple_number_invalid) url_and_cache_path_list.append((url, cache_path)) return url_and_cache_path_list