Fix up posting some changes including unicode with Python 2.x

Review Request #9748 — Created March 5, 2018 and submitted — Latest diff uploaded

Information

RBTools
master
7810223...

Reviewers

The changes I had made to make things encode correctly with Python 3
regressed posting diffs with unicode characters under Python 2. After
some investigation, what's needed is to use the native string type
(str) for headers and URLs passed into urllib2, rather than either
unicode or bytes.

  • Posted a change including an emoji under both Python 2.7 and 3.6.
  • Ran unit tests under Python 2.7 and 3.6.