def _validate(self): errors = [] # Check that the program exists program = Plugin.getProgram(EMRINGER) if program is None: errors.append("Missing variables EMRINGER and/or PHENIX_HOME") elif not os.path.exists(program): errors.append("Binary '%s' does not exists.\n" % program) elif not self.is_tool(DISPLAY): errors.append("display program missing.\n " "Please install imagemagick package") # If there is any error at this point it is related to config variables if errors: errors.append("Check configuration file: " + Config.SCIPION_LOCAL_CONFIG) errors.append("and set EMRINGER and PHENIX_HOME variables " "properly.") if program is not None: errors.append("Current values:") errors.append("PHENIX_HOME = %s" % Plugin.getVar(PHENIX_HOME)) errors.append("EMRINGER = %s" % EMRINGER) # Check that the input volume exist if self._getInputVolume() is None: errors.append("Error: You should provide a volume.\n") return errors
def _validate(self): errors = [] # Check that the program exists program = Plugin.getProgram(SUPERPOSE) if not os.path.exists(program): errors.append("Cannot find " + program) # If there is any error at this point it is related to config variables errors.append("Check configuration file: " + Config.SCIPION_LOCAL_CONFIG) errors.append("and set PHENIX_HOME variables properly.") if program is not None: errors.append("Current values:") errors.append("PHENIX_HOME = %s" % Plugin.getVar(PHENIX_HOME)) errors.append("SUPERPOSE = %s" % SUPERPOSE) return errors