def feature_permission(url, option, msg, yes_action, no_action, abort_on):
 config_val = config.get(*option)
 if (config_val == 'ask'):
  if url.isValid():
   text = 'Allow the website at <b>{}</b> to {}?'.format(html.escape(url.toDisplayString()), msg)
  else:
   text = 'Allow the website to {}?'.format(msg)
  return message.confirm_async(yes_action=yes_action, no_action=no_action, cancel_action=no_action, abort_on=abort_on, title='Permission request', text=text)
 elif config_val:
  yes_action()
  return None
 else:
  no_action()
  return None

def feature_permission ( url , option , msg , yes_action , no_action , abort_on ) : config_val = config . get ( * option ) if ( config_val == 'ask' ) : if url . isValid ( ) : text = 'Allow the website at <b>{}</b> to {}?' . format ( html . escape ( url . toDisplayString ( ) ) , msg ) else : text = 'Allow the website to {}?' . format ( msg ) return message . confirm_async ( yes_action = yes_action , no_action = no_action , cancel_action = no_action , abort_on = abort_on , title = 'Permission request' , text = text ) elif config_val : yes_action ( ) return None else : no_action ( ) return None
handle a feature permission request .