def returner(ret):
 _options = _get_options(ret)
 sid = _options.get('sid', None)
 token = _options.get('token', None)
 sender = _options.get('from', None)
 receiver = _options.get('to', None)
 if ((sid is None) or (token is None)):
  log.error('Twilio sid/authentication token missing')
  return None
 if ((sender is None) or (receiver is None)):
  log.error('Twilio to/from fields are missing')
  return None
 client = TwilioRestClient(sid, token)
 try:
  message = client.messages.create(body='Minion: {0}\nCmd: {1}\nSuccess: {2}\n\nJid: {3}'.format(ret['id'], ret['fun'], ret['success'], ret['jid']), to=receiver, from_=sender)
 except TwilioRestException as e:
  log.error('Twilio [https://www.twilio.com/docs/errors/{0}]'.format(e.code))
  return False
 return True

def returner ( ret ) : _options = _get_options ( ret ) sid = _options . get ( 'sid' , None ) token = _options . get ( 'token' , None ) sender = _options . get ( 'from' , None ) receiver = _options . get ( 'to' , None ) if ( ( sid is None ) or ( token is None ) ) : log . error ( 'Twilio sid/authentication token missing' ) return None if ( ( sender is None ) or ( receiver is None ) ) : log . error ( 'Twilio to/from fields are missing' ) return None client = TwilioRestClient ( sid , token ) try : message = client . messages . create ( body = 'Minion: {0}\nCmd: {1}\nSuccess: {2}\n\nJid: {3}' . format ( ret [ 'id' ] , ret [ 'fun' ] , ret [ 'success' ] , ret [ 'jid' ] ) , to = receiver , from_ = sender ) except TwilioRestException as e : log . error ( 'Twilio [https://www.twilio.com/docs/errors/{0}]' . format ( e . code ) ) return False return True
return data to a influxdb data store .