Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
SHOW DATABASES now returns a databases serie
Browse files Browse the repository at this point in the history
  • Loading branch information
aviau committed Apr 8, 2015
1 parent 728a488 commit 2402662
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion influxdb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def get_list_database(self):
"""
Get the list of databases
"""
return list(self.query("SHOW DATABASES")['results'])
return list(self.query("SHOW DATABASES")['databases'])

def create_database(self, dbname):
"""
Expand Down
7 changes: 4 additions & 3 deletions tests/influxdb/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ def test_drop_database_fails(self):
def test_get_list_database(self):
data = {'results': [
{'series': [
{'values': [
['new_db_1'],
['new_db_2']],
{'name': 'databases',
'values': [
['new_db_1'],
['new_db_2']],
'columns': ['name']}]}
]}

Expand Down

0 comments on commit 2402662

Please sign in to comment.