mirror of
https://github.com/sprockets/sprockets-influxdb.git
synced 2024-11-14 19:29:29 +00:00
python2/3 compatibility fix
This commit is contained in:
parent
b73679c57a
commit
821b80291b
2 changed files with 3 additions and 2 deletions
|
@ -89,7 +89,8 @@ class InfluxDBMixin(object):
|
|||
if hasattr(self, 'correlation_id'):
|
||||
self.influxdb.set_field('correlation_id', self.correlation_id)
|
||||
self.influxdb.set_field('duration', self.request.request_time())
|
||||
parsed = headers.parse_content_type(self._headers['Content-Type'])
|
||||
parsed = headers.parse_content_type(
|
||||
self._headers['Content-Type'].decode('utf-8'))
|
||||
self.influxdb.set_tag(
|
||||
'content_type', '{}/{}'.format(
|
||||
parsed.content_type, parsed.content_subtype))
|
||||
|
|
|
@ -156,7 +156,7 @@ class FakeInfluxDBHandler(web.RequestHandler):
|
|||
payload = self.request.body.decode('utf-8')
|
||||
for line in payload.splitlines():
|
||||
LOGGER.debug('Line: %r', line)
|
||||
parts = LINE_PATTERN.match(line.encode('utf-8'))
|
||||
parts = LINE_PATTERN.match(line)
|
||||
name, tags_str, fields_str, timestamp = parts.groups()
|
||||
|
||||
matches = TAG_PATTERN.findall(tags_str)
|
||||
|
|
Loading…
Reference in a new issue