2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Fix printing of unicode to pipe

nodesensors would have a unicode error on pipe output.
This commit is contained in:
Jarrod Johnson 2019-07-19 15:36:43 -04:00
parent da82fef0cb
commit 44929e7975

View File

@ -150,7 +150,7 @@ def sensorpass(showout=True, appendtime=False):
showval += ' @' + time.strftime(
'%Y-%m-%dT%H:%M:%S')
print(u'{0}: {1}:{2}'.format(
node, sensedata['name'], showval))
node, sensedata['name'], showval).encode('utf8'))
sys.stdout.flush()
return resultdata