Skip to content

Commit

Permalink
HOTFIX: Fix unicode error in merge script.
Browse files Browse the repository at this point in the history
The merge script builds up a big command array and sometimes
this contains both unicode and ascii strings. This doesn't work
if you try to join them into a single string. Longer term a solution
is to go and make sure the source of all strings is unicode.

This patch provides a simpler solution... just print the array
rather than joining. I actually prefer printing an array here
anyways since joining on spaces is lossy in the case of arguments
that themselves contain spaces.

Author: Patrick Wendell <pwendell@gmail.com>

Closes apache#2645 from pwendell/merge-script and squashes the following commits:

167b792 [Patrick Wendell] HOTFIX: Fix unicode error in merge script.
  • Loading branch information
pwendell committed Oct 5, 2014
1 parent 1b97a94 commit e222221
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dev/merge_spark_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ def fail(msg):


def run_cmd(cmd):
print cmd
if isinstance(cmd, list):
print " ".join(cmd)
return subprocess.check_output(cmd)
else:
print cmd
return subprocess.check_output(cmd.split(" "))


Expand Down

0 comments on commit e222221

Please sign in to comment.