def generic_passthrough_kodi_set(results):
 try:
  setting_value = results[0]
 except IndexError:
  setting_value = None
 return setting_value

def generic_passthrough_kodi_set ( results ) : try : setting_value = results [ 0 ] except IndexError : setting_value = None return setting_value
takes a results list .