wenwj0 commented on code in PR #3681: URL: https://github.com/apache/ambari/pull/3681#discussion_r1299145326
########## ambari-server/src/main/python/bootstrap.py: ########## @@ -107,8 +107,9 @@ def run(self): scpstat = subprocess.Popen(scpcommand, stdout=subprocess.PIPE, stderr=subprocess.PIPE) log = scpstat.communicate() - errorMsg = log[1] - log = log[0] + "\n" + log[1] + log_value0 = log[0].decode() Review Comment: > Can you add the check if it is instance of bytes? In python3, Subprocesses output bytes, not characters when calling `communicate()`, so we need to add `universal_newlines=True` if we want str. https://docs.python.org/3.9/library/subprocess.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org For additional commands, e-mail: dev-h...@ambari.apache.org