def _api_retry(name, output, kwargs):
 value = kwargs.get('value')
 if ((name is None) or isinstance(name, basestring)):
  name = kwargs.get('Filedata')
 if ((name is None) or isinstance(name, basestring)):
  name = kwargs.get('nzbfile')
 password = kwargs.get('password')
 password = (password[0] if isinstance(password, list) else password)
 nzo_id = retry_job(value, name, password)
 if nzo_id:
  if isinstance(nzo_id, list):
   nzo_id = nzo_id[0]
  return report(output, keyword='', data={'status': True, 'nzo_id': nzo_id})
 else:
  return report(output, _MSG_NO_ITEM)

def _api_retry ( name , output , kwargs ) : value = kwargs . get ( 'value' ) if ( ( name is None ) or isinstance ( name , basestring ) ) : name = kwargs . get ( 'Filedata' ) if ( ( name is None ) or isinstance ( name , basestring ) ) : name = kwargs . get ( 'nzbfile' ) password = kwargs . get ( 'password' ) password = ( password [ 0 ] if isinstance ( password , list ) else password ) nzo_id = retry_job ( value , name , password ) if nzo_id : if isinstance ( nzo_id , list ) : nzo_id = nzo_id [ 0 ] return report ( output , keyword = '' , data = { 'status' : True , 'nzo_id' : nzo_id } ) else : return report ( output , _MSG_NO_ITEM )
api: accepts name .