def finallyProcess(self, _edObject=None): """ Parses the labelit.screen log file and the generated MOSFLM script """ EDPluginExecProcessScript.finallyProcess(self, _edObject) self.DEBUG("EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess") strLabelitDistlLog = self.readProcessLogFile() if (strLabelitDistlLog is None): strErrorMessage = "EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess : Could not read the Labelit log file" self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() xsDataImageQualityIndicators = XSDataImageQualityIndicators() xsDataImageQualityIndicators.setImage(self.xsDataImage) elif strLabelitDistlLog == "": strLabelitDislErr = self.readProcessErrorLogFile() if "httplib.BadStatusLine" in strLabelitDislErr: strErrorMessage = "Cannot read image due to problem with file permission!" else: strErrorMessage = "Labelit thin client error message: " + strLabelitDislErr self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() xsDataImageQualityIndicators = XSDataImageQualityIndicators() xsDataImageQualityIndicators.setImage(self.xsDataImage) else: xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog) xsDataImageQualityIndicators.setImage(self.xsDataImage) xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength() xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators) self.setDataOutput(xsDataResultDistlSignalStrength)
def finallyProcess(self, _edObject=None): """ Parses the labelit.screen log file and the generated MOSFLM script """ EDPluginExecProcessScript.finallyProcess(self, _edObject) self.DEBUG("EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess") strLabelitDistlLog = self.readProcessLogFile() if (strLabelitDistlLog is None): strErrorMessage = "EDPluginDistlSignalStrengthThinClientv1_1.finallyProcess : Could not read the Labelit log file" self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() xsDataImageQualityIndicators = XSDataImageQualityIndicators() xsDataImageQualityIndicators.setImage(self.xsDataImage) elif strLabelitDistlLog == "": strLabelitDislErr = self.readProcessErrorLogFile() if "httplib.BadStatusLine" in strLabelitDislErr: strErrorMessage = "Cannot read image due to problem with file permission!" else: strErrorMessage = "Labelit thin client error message: " + strLabelitDislErr self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() xsDataImageQualityIndicators = XSDataImageQualityIndicators() xsDataImageQualityIndicators.setImage(self.xsDataImage) else: xsDataImageQualityIndicators = self.parseLabelitDistlOutput( strLabelitDistlLog) xsDataImageQualityIndicators.setImage(self.xsDataImage) xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength() xsDataResultDistlSignalStrength.setImageQualityIndicators( xsDataImageQualityIndicators) self.setDataOutput(xsDataResultDistlSignalStrength)
def postProcess(self, _edObject=None): """ Parses the labelit.screen log file and the generated MOSFLM script """ EDPluginExecProcessScript.postProcess(self, _edObject) self.DEBUG("EDPluginDistlSignalStrengthv1_1.postProcess") strLabelitDistlLog = self.readProcessLogFile() if (strLabelitDistlLog is None or strLabelitDistlLog.strip() == ""): strErrorMessage = "EDPluginDistlSignalStrengthv1_1.postProcess : Could not read the Labelit log file" self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() else: xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog) xsDataImageQualityIndicators.setImage(self.xsDataImage) xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength() xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators) self.setDataOutput(xsDataResultDistlSignalStrength)
def postProcess(self, _edObject=None): """ Parses the labelit.screen log file and the generated MOSFLM script """ EDPluginExecProcessScript.postProcess(self, _edObject) self.DEBUG("EDPluginDistlSignalStrengthv1_1.postProcess") strLabelitDistlLog = self.readProcessLogFile() if (strLabelitDistlLog is None or strLabelitDistlLog.strip() == ""): strErrorMessage = "EDPluginDistlSignalStrengthv1_1.postProcess : Could not read the Labelit log file" self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure() else: xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog) xsDataImageQualityIndicators.setImage(self.xsDataImage) xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength() xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators) self.setDataOutput(xsDataResultDistlSignalStrength)