Beispiel #1
0
    def check_local_cache_conflict(self):
        url        = None
        cache_path = None

        tree = TreeByBinTree()
        url_and_cache_path_list = self.__get_url_and_cache_path_list()
        for (url, cache_path) in url_and_cache_path_list:
            pre_item = tree.find_item(cache_path, '/', False, 1)
            if pre_item == None:
                cur_item = tree.add_item(cache_path, '/', True, False, False)
                cur_item.data = url
            else:
                print 'Warning:'
                print '    current path mapping ' + url + ' to ' + cache_path
                print '    previous path mapping ' + pre_item.data + ' to ' + cache_path
                print '    map the same path.'
Beispiel #2
0
    def check_local_cache_conflict(self):
        url = None
        cache_path = None

        tree = TreeByBinTree()
        url_and_cache_path_list = self.__get_url_and_cache_path_list()
        for (url, cache_path) in url_and_cache_path_list:
            pre_item = tree.find_item(cache_path, '/', False, 1)
            if pre_item == None:
                cur_item = tree.add_item(cache_path, '/', True, False, False)
                cur_item.data = url
            else:
                print 'Warning:'
                print '    current path mapping ' + url + ' to ' + cache_path
                print '    previous path mapping ' + pre_item.data + ' to ' + cache_path
                print '    map the same path.'
Beispiel #3
0
 def import_format_tree_from_file(self, file_path):
     TreeByBinTree.import_format_tree_from_file(self, file_path, "  ", self.import_node_function)
Beispiel #4
0
 def export_format_tree_to_file(self, file_path):
     TreeByBinTree.export_format_tree_to_file(self, file_path, "  ", self.export_node_function)