From 10ec940c2427b8f3e17c57b893f71c22daf9e240 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 (cherry picked from commit 20966a3d7253cb1b2ac3339306e2b9b71a6d7ea3) --- 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 6b428dc0acc..f12e63a91af 100644 --- a/src/pybind/mgr/zabbix/module.py +++ b/src/pybind/mgr/zabbix/module.py @@ -37,7 +37,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.47.3