except URLError as urlError: _writeErrorMessages(writeContext,urlError,"URLError") except Exception as pythonBaseException: _writeErrorMessages(writeContext,pythonBaseException,"Exception") else: if not writeContext is None: writeContext.setAndWriteConfigAfterSuccess() usedOAIParameters = "" if not appContext.getResultCollector() is None: if appContext.getResultCollector().getRecordsDeleted() > 0: procMess = ["start time: ", str( startTime) , "end time: " + str(datetime.now()), "outputfile: " + appContext.getConfiguration().getSummaryContentFile(), "records deleted and shipped to CBS: " + str(appContext.getResultCollector().getRecordsDeleted()), "\n"] writeContext.writeLog(header="records deleted we haven't got via the standard OAI channel",message=procMess ) else: procMess = ["\n", "start time: ", str( startTime) , "end time: " + str(datetime.now()), "\n"] writeContext.writeLog(header="We haven't got a compilation of deleted records that should be shipped to CBS",message=procMess )
except HTTPError as httpError: _writeErrorMessages(writeContext, httpError, "HTTPError") except URLError as urlError: _writeErrorMessages(writeContext, urlError, "URLError") except Exception as pythonBaseException: _writeErrorMessages(writeContext, pythonBaseException, "Exception") else: if not writeContext is None: writeContext.setAndWriteConfigAfterSuccess() usedOAIParameters = "" if not appContext.getResultCollector().getHarvestingParameter( ) is None: usedOAIParameters = '\n'.join([ '%s:: %s' % (key, value) for (key, value) in appContext. getResultCollector().getHarvestingParameter().items() ]) procMess = [ "start time: ", str(startTime), "used OAI Parameters: ", usedOAIParameters, "end time: " + str(datetime.now()), "outputfile: " + appContext.getConfiguration().getSummaryContentFile(), "logged skipped records (if true): " + appContext.getConfiguration().getSummaryContentFileSkipped(), "records deleted: " + str(appContext.getResultCollector().getRecordsDeleted()), "records skipped " +
except URLError as urlError: _writeErrorMessages(writeContext,urlError,"URLError") except Exception as pythonBaseException: _writeErrorMessages(writeContext,pythonBaseException,"Exception") else: if not writeContext is None: writeContext.setAndWriteConfigAfterSuccess(setTimeStamp=False) usedOAIParameters = "" if not appContext.getResultCollector() is None: if appContext.getResultCollector().getRecordsDeleted() > 0: procMess = ["start time: ", str( startTime) , "end time: " + str(datetime.now()), "outputfile: " + appContext.getConfiguration().getSummaryContentFile(), "records deleted and shipped to CBS: " + str(appContext.getResultCollector().getRecordsDeleted()), "\n"] writeContext.writeLog(header="records deleted we haven't got via the standard OAI channel",message=procMess ) else: procMess = ["\n", "start time: ", str( startTime) , "end time: " + str(datetime.now()), "\n"] writeContext.writeLog(header="We haven't got a compilation of deleted records that should be shipped to CBS",message=procMess )