Checks if the device is in configuration mode or not.
484442
def check_config_mode(self, check_string=")#", pattern="#"):
        """"""
        return super(CiscoNxosSSH, self).check_config_mode(
            check_string=check_string, pattern=pattern
        )
497358
def check_valid_device(self, path, run_as_root=True):
        """"""
        if self.im_root:
            try:
                with open(path, 'r') as f:
                    f.read(4096)
            except Exception:
                return False
            return True

        try:
            self._execute('dd', 'if=' + path, 'of=/dev/null', 'bs=4096',
                          'count=1', root_helper=self._root_helper,
                          run_as_root=True)
        except putils.ProcessExecutionError:
            return False
        return True
508943
def check_config_mode(self, check_string=")#", pattern="#"):
        
        return super(CiscoIosBase, self).check_config_mode(
            check_string=check_string, pattern=pattern
        )
450752
def detectUbuntuTablet(self):
        
        if UAgentInfo.deviceUbuntu in self.__userAgent \
           and UAgentInfo.deviceTablet in self.__userAgent:
            return True

        return False
900722
def is_installed(self):
        
        return self.is_configured() and os.access(self.bin(), os.X_OK)
1051658
def check_offline_configuration(self):
        ''' '''
        quit_on_start = False
        database_url = self.config.get('Database Parameters', 'database_url')
        host = self.config.get('Server Parameters', 'host', 'localhost')
        if database_url[:6] != 'sqlite':
            print("*** Error: config.txt option 'database_url' set to use "
                "mysql://.  Please change this sqllite:// while in cabin mode.")
            quit_on_start = True
        if host != 'localhost':
            print("*** Error: config option 'host' is not set to localhost. "
                "Please change this to localhost while in cabin mode.")
            quit_on_start = True
        if quit_on_start:
            exit()
554864
def bootdevice(device, reboot = false, persistent = false)
      if config.bootdevices.include?(device)
        bootstatus = config.bootdevice(device, persistent)
        power.cycle if reboot && bootstatus
      else
        logger.error("Device with name: #{device} is not a valid boot device for host #{options['hostname']}") if logger
        raise "Device with name: #{device} is not a valid boot device for host #{options['hostname']}"
      end
    end
921688
def has_device_info(self, key):
        """"""
        if _debug: DeviceInfoCache._debug("has_device_info %r", key)

        return key in self.cache
1277087
public static function isEnabled()
    {
        if ( eZINI::instance()->variable( 'SiteAccessSettings', 'DetectMobileDevice' ) === 'enabled' )
        {
            $mobileSaList = eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessList' );

            if ( !empty( $mobileSaList ) )
            {
                return true;
            }
            else
            {
                eZDebug::writeError(
                    "DetectMobileDevice is enabled and MobileSiteAccessList is empty, please check your site.ini configuration",
                    __METHOD__
                );
            }
        }

        return false;
    }
802517
def check_config(self, section, name, has_default=False, value=None, allowEmpty=False):
    
    

    cfg = self.config
    if not cfg.has_key(section) or not cfg.get(section).has_key(name):
      if not has_default:
        self.config_errors.append("%s: %s -> missing" % (section, name))
        return False
      else:
        return True

    v = cfg.get(section).get(name)

    if v == "" and not allowEmpty:
      self.config_errors.append("%s: %s -> empty" % (section, name))
      return False
    return True
1321370
def compare_config(self):
        """"""
        diff = self.device.cu.diff()

        if diff is None:
            return ''
        else:
            return diff.strip()
776136
def _CheckIsDevice(self, file_entry):
    
    if definitions.FILE_ENTRY_TYPE_DEVICE not in self._file_entry_types:
      return False
    return file_entry.IsDevice()
437371
public function isUnoconvReady() {
		$cfgUnoconv = $this->_getUnoconvConfig();
		if ($cfgUnoconv === false) {
			return false;
		}

		if (!file_exists($cfgUnoconv['binaries'])) {
			return false;
		}

		return true;
	}
878083
def __check_config_key(self, key):
        
        try:
            section, option = key.split('.')
        except (AttributeError, ValueError):
            return False

        if not section or not option:
            return False

        return section in Config.CONFIG_OPTIONS and\
            option in Config.CONFIG_OPTIONS[section]
868469
public function is_configured() {
        if ($this->get_config('runningmethod') === 'commandline') {
            return (bool)$this->get_config('pathtoclam');
        } else if ($this->get_config('runningmethod') === 'unixsocket') {
            return (bool)$this->get_config('pathtounixsocket');
        }
        return false;
    }
943858
def check_config_mode(self, check_string=")#", pattern=""):
        """"""
        return super(CalixB6Base, self).check_config_mode(check_string=check_string)
443200
function isInvalidConfiguration(config) {
  return R.compose(
    R.any(R.either(R.isNil, R.isEmpty))
  , R.values
  , R.pickAll(['url', 'port'])
  , R.propOr({}, 'server')
  )(config)
}