Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Move tests: unit/network_services/helpers
[yardstick.git]
/
third_party
/
influxdb
/
influxdb_line_protocol.py
diff --git
a/third_party/influxdb/influxdb_line_protocol.py
b/third_party/influxdb/influxdb_line_protocol.py
index
eee9821
..
12b010c
100644
(file)
--- a/
third_party/influxdb/influxdb_line_protocol.py
+++ b/
third_party/influxdb/influxdb_line_protocol.py
@@
-24,9
+24,12
@@
# yardstick comment: this file is a modified copy of
# influxdb-python/influxdb/line_protocol.py
# yardstick comment: this file is a modified copy of
# influxdb-python/influxdb/line_protocol.py
+from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import unicode_literals
+
from copy import copy
from copy import copy
+from oslo_utils import encodeutils
from six import binary_type, text_type, integer_types
from six import binary_type, text_type, integer_types
@@
-64,7
+67,7
@@
def _get_unicode(data, force=False):
Try to return a text aka unicode object from the given data.
"""
if isinstance(data, binary_type):
Try to return a text aka unicode object from the given data.
"""
if isinstance(data, binary_type):
- return
data.decode(
'utf-8')
+ return
encodeutils.safe_decode(data,
'utf-8')
elif data is None:
return ''
elif force:
elif data is None:
return ''
elif force: