@cryptotaxi247 / netdata-1 / commits / ba9d92159

python.d logger: do not unicode decode if it is already unicode (#7614)

Ilya Mashchenko committed Dec 24, 2019 at 12:01 UTC ba9d92159f3dc0207e4732b755938f6faaefb9ef
1 file changed +2
collectors/python.d.plugin/python_modules/bases/collection.py
+2
@@ -95,6 +95,8 @@ def unicode_str(arg):
95 :return: <str>
96 """
97 try:
98 + if isinstance(arg, unicode):
99 + return arg
100 return unicode(arg, errors='ignore')
101 except NameError:
102 return str(arg)