From 567ad1826b7daba4559505162aacc25a755e3607 Mon Sep 17 00:00:00 2001 From: Bruceforce Date: Tue, 19 Mar 2019 18:23:56 +0100 Subject: [PATCH] ceph_crush: fix rstrip for python 3 Removing bytes literals since rstrip only supports type String or None. Please backport to stable-3.2 Signed-off-by: Bruceforce (cherry picked from commit 6d506dba1a6fb3a827460d3a7090517cf3241c39) --- library/ceph_crush.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ceph_crush.py b/library/ceph_crush.py index 1289e9080..77714bb72 100644 --- a/library/ceph_crush.py +++ b/library/ceph_crush.py @@ -145,7 +145,7 @@ def exec_commands(module, cmd_list): Creates Ceph commands ''' for cmd in cmd_list: - rc, out, err = module.run_command(cmd, encoding=None) + rc, out, err = module.run_command(cmd) return rc, cmd, out, err @@ -193,8 +193,8 @@ def run_module(): end=str(endd), delta=str(delta), rc=rc, - stdout=out.rstrip(b"\r\n"), - stderr=err.rstrip(b"\r\n"), + stdout=out.rstrip("\r\n"), + stderr=err.rstrip("\r\n"), changed=True, ) -- 2.39.5