def _create_user_list(sailthru_client, list_name):
 list_params = {'list': list_name, 'primary': 0, 'public_name': list_name}
 try:
  sailthru_response = sailthru_client.api_post('list', list_params)
 except SailthruClientError as exc:
  log.error('Exception attempting to list record for key %s in Sailthru - %s', list_name, unicode(exc))
  return False
 if (not sailthru_response.is_ok()):
  error = sailthru_response.get_error()
  log.error('Error attempting to create list in Sailthru: %s', error.get_message())
  return False
 return True

def _create_user_list ( sailthru_client , list_name ) : list_params = { 'list' : list_name , 'primary' : 0 , 'public_name' : list_name } try : sailthru_response = sailthru_client . api_post ( 'list' , list_params ) except SailthruClientError as exc : log . error ( 'Exception attempting to list record for key %s in Sailthru - %s' , list_name , unicode ( exc ) ) return False if ( not sailthru_response . is_ok ( ) ) : error = sailthru_response . get_error ( ) log . error ( 'Error attempting to create list in Sailthru: %s' , error . get_message ( ) ) return False return True
create list in sailthru .