コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 def __init__(self):
     EDPluginExecProcessScript.__init__(self)
     self.setXSDataInputClass(XSDataInputDistlSignalStrength)
     self.setDataOutput(XSDataResultDistlSignalStrength())
コード例 #4
0
 def __init__(self):
     EDPluginExecProcessScript.__init__(self)
     self.setXSDataInputClass(XSDataInputDistlSignalStrength)
     self.strHostName = "localhost"
     self.iPortNumber = self.DEFAULT_SERVER_PORT
     self.setDataOutput(XSDataResultDistlSignalStrength())