def processLine( self, line ): '''Process a line of text, and return the result.''' check_for_string( line, 'processLine only accepts string input.' ) if not line: return '' result = '' text = line[:] while text: result, text = self.__processToken( result, text ) return result
def preFlightCheck( self ): # check settings, may fail settings = mApp().getSettings() for setting in [ Settings.EmailReporterDefaultRecipients, Settings.EmailReporterConfigurationErrorRecipients, Settings.EmailReporterMomErrorRecipients ]: value = settings.get( setting, False ) check_for_list_of_strings_or_none( settings.get( setting, False ), "{0} must be a list of valid email addresses, not \"{1}\"".format( setting, value ) ) check_for_string( settings.get( Settings.EmailReporterSender ), "EmailReporterSender must be a valid email address" )
def _setStep( self, step ): check_for_string( step, 'The step for the publisher must be a string representing a step name!' ) self.__step = step
def setSourcePrefix( self, sourcePrefix ): check_for_string( sourcePrefix, "The source prefix needs to be a string" ) self.__sourcePrefix = sourcePrefix
def setLogfilePath( self, logfileName ): check_for_string( logfileName, "The log file parameter must be a string containing a file name." ) self.__logfilePath = logfileName