Convert jwt encode to string for github in python3
The result of a JWT encode() in python3 is a bytes object. When it is
then inserted into the bearer string python does the simple encoding and
inserts a b'<token>' into the header and so authentication fails.
Change-Id: I8f861010ee3b55d1b01e91b9a87812722e0a4f00
diff --git a/zuul/driver/github/githubconnection.py b/zuul/driver/github/githubconnection.py
index 7a3491e..d26bdbe 100644
--- a/zuul/driver/github/githubconnection.py
+++ b/zuul/driver/github/githubconnection.py
@@ -427,7 +427,7 @@
data = {'iat': now, 'exp': expiry, 'iss': self.app_id}
app_token = jwt.encode(data,
self.app_key,
- algorithm='RS256')
+ algorithm='RS256').decode('utf-8')
url = ACCESS_TOKEN_URL % installation_id
headers = {'Accept': PREVIEW_JSON_ACCEPT,