Skip to content

Commit

Permalink
DOC fix building of docs in Python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Jul 21, 2014
1 parent ca63523 commit 79afc76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/sphinxext/github_link.py
Expand Up @@ -39,7 +39,10 @@ def _linkcode_resolve(domain, info, package, url_fmt, revision):
if not info.get('module') or not info.get('fullname'):
return

class_name = info['fullname'].split('.')[0].encode('utf-8')
class_name = info['fullname'].split('.')[0]
if type(class_name) != str:
# Python 2 only
class_name = class_name.encode('utf-8')
module = __import__(info['module'], fromlist=[class_name])
obj = attrgetter(info['fullname'])(module)

Expand Down

0 comments on commit 79afc76

Please sign in to comment.