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

Commit

Permalink
Fix json decoding on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashaag committed Oct 29, 2014
1 parent 376fb43 commit d196ae6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions influxdb/client.py
Expand Up @@ -322,13 +322,7 @@ def query(self, query, time_precision='s', chunked=False):
status_code=200
)

try:
res = json.loads(response.content)
except TypeError:
# must decode in python 3
res = json.loads(response.content.decode('utf8'))

return res
return response.json()

# Creating and Dropping Databases
#
Expand Down Expand Up @@ -396,7 +390,7 @@ def get_database_list(self):
status_code=200
)

return json.loads(response.content)
return response.json()

def delete_series(self, series):
"""
Expand Down

0 comments on commit d196ae6

Please sign in to comment.