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 <markus.greis@gmx.de>
pull/3732/head
Bruceforce 2019-03-19 18:23:56 +01:00 committed by mergify[bot]
parent 3305309e87
commit 6d506dba1a
1 changed files with 3 additions and 3 deletions

View File

@ -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,
)