diff --git a/gpMgmt/bin/gppylib/util/ssh_utils.py b/gpMgmt/bin/gppylib/util/ssh_utils.py index f194d8b2d02..bab39ef6ef2 100644 --- a/gpMgmt/bin/gppylib/util/ssh_utils.py +++ b/gpMgmt/bin/gppylib/util/ssh_utils.py @@ -283,8 +283,9 @@ def executeCommand(self, command): for s in self.pxssh_list: # Split the output into an array of lines so that we can add text to the beginning of - # each line - output = s.before.split(b'\n') + # each line. Decoding string as we are getting bytecode string in s.before + # Removing \r characters in each line by strip + output = [x.strip() for x in s.before.decode().split('\n')] output = output[1:-1] commandoutput.append(output)