build-integration-branch script can fail with UnicodeEncodeError
The build-integration-script assumes it is running in an environment where sys.stdout.encoding is UTF-8. But this might not always be true.
The easiest way to reproduce the error is to introduce a non-ascii character (such as …) into a PR title and then run the script on a label that includes that PR, prefixing the script with "LC_CTYPE=latin1" like so:
$ LC_CTYPE=latin1 build-integration-branch wip-smithfarm-testing --- found 1 issues tagged with wip-smithfarm-testing --- queried 1 prs branch wip-smithfarm-testing-2018-05-03-2304 --- creating branch wip-smithfarm-testing-2018-05-03-2304 Switched to a new branch 'wip-smithfarm-testing-2018-05-03-2304' --- pr 20401 --- pulling https://github.com/smithfarm/ceph.git branch wip-22558 From https://github.com/smithfarm/ceph * branch wip-22558 -> FETCH_HEAD Adding qa/suites/rbd/mirror/cluster Adding qa/suites/rbd/mirror/base Auto-merging ceph.spec.in Merge made by the 'recursive' strategy. ceph.spec.in | 3 +++ 1 file changed, 3 insertions(+) --- done. these PRs were included: Traceback (most recent call last): File "/home/smithfarm/bin/build-integration-branch", line 65, in <module> print('\n'.join(prtext)) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 93: ordinal not in range(128)