Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19697 )

Change subject: IMPALA-9627: Update utility scripts for Python 3 (part 2)
......................................................................


Patch Set 14:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19697/14/bin/push_to_asf.py
File bin/push_to_asf.py:

http://gerrit.cloudera.org:8080/#/c/19697/14/bin/push_to_asf.py@66
PS14, Line 66: def check_output(*popenargs, **kwargs):
             :   r"""Run command with arguments and return its output as a byte 
string.
             :   Backported from Python 2.7 as it's implemented as pure python 
on stdlib.
             :   >>> check_output(['/usr/bin/python', '--version'])
             :   Python 2.6.2
             :   """
             :   process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, 
**kwargs)
             :   output, unused_err = process.communicate()
             :   retcode = process.poll()
             :   if retcode:
             :     cmd = kwargs.get("args")
             :     if cmd is None:
             :       cmd = popenargs[0]
             :     error = subprocess.CalledProcessError(retcode, cmd)
             :     error.output = output
             :     raise error
             :   return output.decode()
> As a historical thing, this was needed when we supported python 2.6, which
Sounds like a good idea to me.



--
To view, visit http://gerrit.cloudera.org:8080/19697
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idff388aff33817b0629347f5843ec34c78f0d0cb
Gerrit-Change-Number: 19697
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Comment-Date: Fri, 21 Apr 2023 22:16:25 +0000
Gerrit-HasComments: Yes

Reply via email to