Fix rbt post on Python 3.5 (invalid kwarg)

Review Request #10354 — Created Dec. 10, 2018 and submitted — Latest diff uploaded

Information

RBTools
master
eb5af81...

Reviewers

Popen didn't gain the encoding parameter until 3.6:
https://docs.python.org/3/whatsnew/3.6.html#subprocess

On 3.5, universal_newlines is available, but encoding is not:
https://docs.python.org/3.5/library/subprocess.html

With these changes, rbt post works in a Python 3.5.6 environment. Similarly, the test suite passes for me (save 3 svn-related tests that are failing due to not have subversion installed).

I'd be happy to add some new tests if desired, but this also seems small enough in scope that it should be safe as-is.

  • Used rbt post in Python 2.7, 3.5, and 3.6 with these changes
  • rbt post works when pushing diffs with Unicode content
  • Test suite passes locally