Performs some checks.

        :return: None if successful, otherwise error message.
        :rtype: str
437045
def setup(self):
        
        result = super(BranchDirector, self).setup()
        if result is None:
            try:
                self.check_actors()
            except Exception, e:
                result = str(e)
        return result
409012
def check(module):
  global passed, failed
  '''
  
  '''
  module_name = module.rsplit('/', 1)[1]
  if module[-3:] == ".py" and module_name not in IGNORED_FILES:
    print ("CHECKING ", module)
    pout = os.popen('pylint %s'% module, 'r')
    for line in pout:
      if "Your code has been rated at" in line:
        print ("PASSED pylint inspection: " + line)
        passed += 1
        return True
      if "-error" in line:
        print ("FAILED pylint inspection: " + line)
        failed += 1
        errors.append("FILE: " + module)
        errors.append("FAILED pylint inspection: " + line)
        return False
1066832
public function performCheck()
    {
        $this->emailCheck($this->getEmailSendCheck(), self::EMAIL_SEND_CHECK_MSG);
        $this->emailCheck($this->getEmailReceiveCheck(), self::EMAIL_RECEIVE_CHECK_MSG);
    }
1288490
def error(self, error_msg):
        
        if self.logger is not None:
            self.logger.error(error_msg)

        if self.exc is not None:
            raise self.exc(error_msg)
234444
def execute(self):
        
        if self.args and self.argument(0) == "help":
            self.error(self.usage() + "\n\n" + self.help())
            return False

        return True
707018
def _def_check(self):
        
        if self._def != dict():
            for key, val in iteritems_(self._def):
                if key not in list(TEXT_INDEX_ARGS.keys()):
                    raise CloudantArgumentError(127, key)
                if not isinstance(val, TEXT_INDEX_ARGS[key]):
                    raise CloudantArgumentError(128, key, TEXT_INDEX_ARGS[key])
229489
def validate(cls):
        
        if cls.get_dict():
            cls.show_error(False)
            return True

        cls.show_error(True)
        return False
1140427
def _check(self): # TODO: fix?
        """"""
        if self._returncode:
            rarfile.check_returncode(self, '')
        if self._remain != 0:
            raise rarfile.BadRarFile("Failed the read enough data")
688428
def _validate(self):
        

        if self._state is not states.INITIAL:
            raise ValueError(obj=self._uid,
                             attribute='state',
                             expected_value=states.INITIAL,
                             actual_value=self._state)

        if not self._executable:
            raise MissingError(obj=self._uid,
                               missing_attribute='executable')
453073
def check_errors(raw: false)
      return if @err_array.empty?
      command = ''
      rest = ''
      @semaphore.synchronize do
        command = @err_array.first
        rest = @err_array[1..-1].join('; ')
        @err_array.clear
      end
      message = if raw
        "#{command};#{rest}}"
      else
        "Error in previous command (\"#{command}\"): \"#{rest}\""
      end
      fail GnuplotError, message
    end
645108
def check_errors(self, is_global=False):
    
    errors = self.global_errors if is_global else self.errors
    if errors:
      print('dfTimewolf encountered one or more errors:')
      for error, critical in errors:
        print('{0:s}  {1:s}'.format('CRITICAL: ' if critical else '', error))
        if critical:
          print('Critical error found. Aborting.')
          sys.exit(-1)
220514
def check(self):
        '''
        '''

        for info in self.get_info():
            if info.free < info.limit:
                return info
481755
def validate(self):
        
        super(BoolFilter, self).validate()

        self._value = truth(str(self._value), self._condition)
        self._condition = "yes" if self._value else "no"
906454
def _run_checks(self):
        '''
        '''
        if self.recipe is not None:

            # Does the recipe provided exist?
            if not os.path.exists(self.recipe):
                bot.error("Cannot find %s, is the path correct?" %self.recipe)
                sys.exit(1)

            # Ensure we carry fullpath
            self.recipe = os.path.abspath(self.recipe)
174647
def _check(self, mode=None):
        
        if self.closed:
            raise IOError("%s is closed" % self.__class__.__name__)
        if mode is not None and self.mode not in mode:
            raise IOError("bad operation for mode %r" % self.mode)
772044
def precheck():
    
    binaries = ['make']
    for bin in binaries:
        if not which(bin):
            msg = 'Dependency fail -- Unable to locate rquired binary: '
            stdout_message('%s: %s' % (msg, ACCENT + bin + RESET))
            return False
        elif not root():
            return False
    return True
1255484
def _is_error(self):
        '''
        
        '''
        if self.exit_code:
            msg = self.SUCCESS_EXIT_CODES.get(self.exit_code)
            if msg:
                log.info(msg)
            msg = self.WARNING_EXIT_CODES.get(self.exit_code)
            if msg:
                log.warning(msg)

        return self.exit_code not in self.SUCCESS_EXIT_CODES and self.exit_code not in self.WARNING_EXIT_CODES