def __getPreviousCFG( self, oRemoteConfData ): remoteExpectedVersion = oRemoteConfData.getVersion() backupsList = self.__getCfgBackups( gConfigurationData.getBackupDir(), date = oRemoteConfData.getVersion() ) if not backupsList: return S_ERROR( "Could not AutoMerge. Could not retrieve original commiter's version" ) prevRemoteConfData = ConfigurationData() backFile = backupsList[0] if backFile[0] == "/": backFile = os.path.join( gConfigurationData.getBackupDir(), backFile[1:] ) try: prevRemoteConfData.loadConfigurationData( backFile ) except Exception, e: return S_ERROR( "Could not load original commiter's version: %s" % str( e ) )
def __getPreviousCFG(self, oRemoteConfData): backupsList = self.__getCfgBackups(gConfigurationData.getBackupDir(), date=oRemoteConfData.getVersion()) if not backupsList: return S_ERROR("Could not AutoMerge. Could not retrieve original committer's version") prevRemoteConfData = ConfigurationData() backFile = backupsList[0] if backFile[0] == "/": backFile = os.path.join(gConfigurationData.getBackupDir(), backFile[1:]) try: prevRemoteConfData.loadConfigurationData(backFile) except Exception as e: return S_ERROR("Could not load original committer's version: %s" % str(e)) gLogger.info("Loaded client original version %s" % prevRemoteConfData.getVersion()) return S_OK(prevRemoteConfData.getRemoteCFG())
def __getPreviousCFG(self, oRemoteConfData): remoteExpectedVersion = oRemoteConfData.getVersion() backupsList = self.__getCfgBackups(gConfigurationData.getBackupDir(), date=oRemoteConfData.getVersion()) if not backupsList: return S_ERROR( "Could not AutoMerge. Could not retrieve original commiter's version" ) prevRemoteConfData = ConfigurationData() backFile = backupsList[0] if backFile[0] == "/": backFile = os.path.join(gConfigurationData.getBackupDir(), backFile[1:]) try: prevRemoteConfData.loadConfigurationData(backFile) except Exception, e: return S_ERROR("Could not load original commiter's version: %s" % str(e))