def OpenClient(client_id=None, token=None):
 if (not token):
  try:
   token = ApprovalFind(client_id, token=token)
  except access_control.UnauthorizedAccess as e:
   logging.debug('No authorization found for access to client: %s', e)
 try:
  client = aff4.FACTORY.Open(rdfvalue.RDFURN(client_id), mode='r', token=token)
  return (client, token)
 except access_control.UnauthorizedAccess:
  logging.warning('Unable to find a valid reason for client %s. You may need to request approval.', client_id)
  return (None, None)

def OpenClient ( client_id = None , token = None ) : if ( not token ) : try : token = ApprovalFind ( client_id , token = token ) except access_control . UnauthorizedAccess as e : logging . debug ( 'No authorization found for access to client: %s' , e ) try : client = aff4 . FACTORY . Open ( rdfvalue . RDFURN ( client_id ) , mode = 'r' , token = token ) return ( client , token ) except access_control . UnauthorizedAccess : logging . warning ( 'Unable to find a valid reason for client %s. You may need to request approval.' , client_id ) return ( None , None )
opens the client .