Fix the default User-Agent value.
String encoding meant that on Python 3.x, the default user agent was
being sent as "b'RBTools/...'". This change fixes it up to initialize it
as a unicode string, which will get properly normalized on all versions
when we call `str` to insert the header.
Reviewed at
@@ -731,7 +731,7 @@ class ReviewBoardServer(object):
if agent:
self.agent = agent
else:
- self.agent = ('RBTools/' + get_package_version()).encode('utf-8')
+ self.agent = 'RBTools/' + get_package_version()
opener = build_opener(*handlers)
opener.addheaders = [
