def check_flags(required_flags, configuration):
 for flag in required_flags:
  if (not getattr(configuration, flag, None)):
   msg = (_('Configuration value %s is not set.') % flag)
   raise exception.InvalidInput(reason=msg)

def check_flags ( required_flags , configuration ) : for flag in required_flags : if ( not getattr ( configuration , flag , None ) ) : msg = ( _ ( 'Configuration value %s is not set.' ) % flag ) raise exception . InvalidInput ( reason = msg )
ensure that the flags we care about are set .