コード例 #1
0
def translateRegistry(_registry):
    def update_descriptors(old_obj, translate_dict):
        def get_update_method(package_version):
            def update_package_version(old_desc, t_dict):
                return package_version
            return update_package_version

        descriptors = []
        for descriptor in old_obj.db_module_descriptors:
            new_t_dict = {'DBModuleDescriptor': 
                          {'package_version': \
                               get_update_method(old_obj.db_version)}}
            d = DBModuleDescriptor.update_version(descriptor, new_t_dict)
            descriptors.append(d)
        return descriptors

    translate_dict = {'DBPackage': {'module_descriptors': update_descriptors}}
    registry = DBRegistry.update_version(_registry, translate_dict)
    registry.db_version = '1.0.1'
    return registry
コード例 #2
0
def translateRegistry(_registry):
    def update_descriptors(old_obj, translate_dict):
        def get_update_method(package_version):
            def update_package_version(old_desc, t_dict):
                return package_version

            return update_package_version

        descriptors = []
        for descriptor in old_obj.db_module_descriptors:
            new_t_dict = {'DBModuleDescriptor':
                          {'package_version': \
                               get_update_method(old_obj.db_version)}}
            d = DBModuleDescriptor.update_version(descriptor, new_t_dict)
            descriptors.append(d)
        return descriptors

    translate_dict = {'DBPackage': {'module_descriptors': update_descriptors}}
    registry = DBRegistry.update_version(_registry, translate_dict)
    registry.db_version = '1.0.1'
    return registry
コード例 #3
0
def translateRegistry(_registry):
    translate_dict = {}
    registry = DBRegistry.update_version(_registry, translate_dict)
    registry.db_version = '1.0.1'
    return registry
コード例 #4
0
ファイル: v1_0_2.py プロジェクト: painter1/vistrails
def translateRegistry(_registry):
    translate_dict = {}
    registry = DBRegistry.update_version(_registry, translate_dict)
    registry.db_version = '1.0.1'
    return registry