Commit 3e84005d authored by Patrick Godwin's avatar Patrick Godwin
Browse files

influx.py: change where utf encoding happens during line protocol for py3 compat

parent 1ea2f510
......@@ -1212,7 +1212,7 @@ def _rows_to_line_protocol(measurement, rows, aggregate=None):
packet = {'points': points}
### convert to line protocol
return line_protocol.make_lines(packet).encode('utf-8')
return line_protocol.make_lines(packet)
def _columns_to_line_protocol(measurement, time, columns, tags=None, aggregate=None):
......@@ -1237,7 +1237,7 @@ def _columns_to_line_protocol(measurement, time, columns, tags=None, aggregate=N
packet = {'points': points}
### convert to line protocol
return line_protocol.make_lines(packet).encode('utf-8')
return line_protocol.make_lines(packet)
def _store_lines(client, db, lines, dt=None, far=None):
......@@ -1253,7 +1253,7 @@ def _store_lines(client, db, lines, dt=None, far=None):
headers.update(client.headers)
### push to client
client.urlopen('POST', '/write?{}'.format(params), body=lines, headers=headers)
client.urlopen('POST', '/write?{}'.format(params), body=lines.encode('utf-8'), headers=headers)
def _format_influxql_measurement(database_name, measurement, dt=None, far=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment