def classFactory(self, connection, modulename, globalname): if globalname == "PersistentMapping": modulename = "persistent.mapping" elif globalname == "PersistentList": modulename = "persistent.list" elif modulename.startswith("IndexedCatalog.BTrees."): modulename = "BTrees.%s" % modulename[22:] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): if globalname=="PersistentMapping": modulename="persistent.mapping" elif globalname=="PersistentList": modulename="persistent.list" elif modulename.startswith("IndexedCatalog.BTrees."): modulename="BTrees.%s"%modulename[22:] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): if globalname == "PersistentMapping": modulename = "persistent.mapping" elif globalname == "PersistentList": modulename = "persistent.list" elif modulename.startswith("IndexedCatalog.BTrees."): modulename = "BTrees.%s" % modulename[22:] elif modulename.startswith("MaKaC.plugins.EPayment.CERNYellowPay."): modulename = "indico.ext.epayment.cern.%s" % modulename[len("MaKaC.plugins.EPayment.CERNYellowPay.") :] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): if globalname == "PersistentMapping": modulename = "persistent.mapping" elif globalname == "PersistentList": modulename = "persistent.list" elif modulename.startswith("IndexedCatalog.BTrees."): modulename = "BTrees.%s" % modulename[22:] elif modulename.startswith("MaKaC.plugins.EPayment.CERNYellowPay."): modulename = "indico.ext.epayment.cern.%s" % modulename[ len("MaKaC.plugins.EPayment.CERNYellowPay."):] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): if globalname in globalname_dict: if globalname_dict[globalname][0]: modulename = globalname_dict[globalname][0] if globalname_dict[globalname][1]: globalname = globalname_dict[globalname][1] # There is an else in order to do not overwrite the rule. # It could create some inconsistency elif modulename in modulename_dict: modulename = modulename_dict[modulename] else: # This is the case of a module with submodules for former_mod_name in modulename_dict: if former_mod_name[-1] == "." and modulename.startswith(former_mod_name): modulename = modulename_dict[former_mod_name] + modulename[len(former_mod_name):] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): if globalname in globalname_dict: if globalname_dict[globalname][0]: modulename = globalname_dict[globalname][0] if globalname_dict[globalname][1]: globalname = globalname_dict[globalname][1] # There is an else in order to do not overwrite the rule. # It could create some inconsistency elif modulename in modulename_dict: modulename = modulename_dict[modulename] else: # This is the case of a module with submodules for former_mod_name in modulename_dict: if former_mod_name[-1] == "." and modulename.startswith( former_mod_name): modulename = modulename_dict[former_mod_name] + modulename[ len(former_mod_name):] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): # indico_ are new plugins, we don't need/want this kind of migration there # The main reason for this check is not having to rename FoundationSyncTask # which was deleted from core and now resides in a plugin. if globalname in globalname_dict and not modulename.startswith('indico_'): if globalname_dict[globalname][0]: modulename = globalname_dict[globalname][0] if globalname_dict[globalname][1]: globalname = globalname_dict[globalname][1] # There is an else in order to do not overwrite the rule. # It could create some inconsistency elif modulename in modulename_dict: modulename = modulename_dict[modulename] else: # This is the case of a module with submodules for former_mod_name in modulename_dict: if former_mod_name[-1] == "." and modulename.startswith(former_mod_name): modulename = modulename_dict[former_mod_name] + modulename[len(former_mod_name):] return DB.classFactory(self, connection, modulename, globalname)
def classFactory(self, connection, modulename, globalname): # indico_ are new plugins, we don't need/want this kind of migration there # The main reason for this check is not having to rename FoundationSyncTask # which was deleted from core and now resides in a plugin. if globalname in globalname_dict and not modulename.startswith( 'indico_'): if globalname_dict[globalname][0]: modulename = globalname_dict[globalname][0] if globalname_dict[globalname][1]: globalname = globalname_dict[globalname][1] # There is an else in order to do not overwrite the rule. # It could create some inconsistency elif modulename in modulename_dict: modulename = modulename_dict[modulename] else: # This is the case of a module with submodules for former_mod_name in modulename_dict: if former_mod_name[-1] == "." and modulename.startswith( former_mod_name): modulename = modulename_dict[former_mod_name] + modulename[ len(former_mod_name):] return DB.classFactory(self, connection, modulename, globalname)