def is_config_valid(config):
 for ii in REQUIRED_CONFIG_FIELDS:
  try:
   if config[ii]:
    pass
  except KeyError:
   logging.error((('Unable to find ' + str(ii)) + ' in configuration'))
   return False
 return True

def is_config_valid ( config ) : for ii in REQUIRED_CONFIG_FIELDS : try : if config [ ii ] : pass except KeyError : logging . error ( ( ( 'Unable to find ' + str ( ii ) ) + ' in configuration' ) ) return False return True
takes a configuration and checks to make sure all required properties are present .