From 20966a3d7253cb1b2ac3339306e2b9b71a6d7ea3 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 18 Jun 2019 10:10:30 +0200 Subject: [PATCH] mgr/zabbix: encode string for Python 3 compatibility Credits to Jochem Kuijpers for the fix. Fixes: https://tracker.ceph.com/issues/36318 Signed-off-by: Nathan Cutler --- src/pybind/mgr/zabbix/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/zabbix/module.py b/src/pybind/mgr/zabbix/module.py index bd7c9c20b13..e864735ccc0 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -38,7 +38,7 @@ class ZabbixSender(object): proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) for key, value in data.items(): - proc.stdin.write('{0} ceph.{1} {2}\n'.format(hostname, key, value)) + proc.stdin.write('{0} ceph.{1} {2}\n'.format(hostname, key, value).encode('utf-8')) stdout, stderr = proc.communicate() if proc.returncode != 0: -- 2.39.5