def login_test(name, password, database=None, host=None, port=None):
 try:
  client = _client(user=name, password=password, host=host, port=port)
  client.get_list_database()
  return True
 except influxdb.influxdb08.client.InfluxDBClientError as e:
  if (e.code == 401):
   return False
  else:
   raise

def login_test ( name , password , database = None , host = None , port = None ) : try : client = _client ( user = name , password = password , host = host , port = port ) client . get_list_database ( ) return True except influxdb . influxdb08 . client . InfluxDBClientError as e : if ( e . code == 401 ) : return False else : raise
checks if a credential pair can log in at all .