1 parent dac4efa commit 72e569cCopy full SHA for 72e569c
1 file changed
github3/github.py
@@ -1566,11 +1566,11 @@ def user_with_id(self, number):
1566
def zen(self):
1567
"""Returns a quote from the Zen of GitHub. Yet another API Easter Egg
1568
1569
- :returns: str
+ :returns: str (on Python 3, unicode on Python 2)
1570
"""
1571
url = self._build_url('zen')
1572
resp = self._get(url)
1573
- return resp.content if resp.status_code == 200 else ''
+ return resp.text if resp.status_code == 200 else b''.decode('utf-8')
1574
1575
1576
class GitHubEnterprise(GitHub):
0 commit comments