Merge pull request #4485 from tk0miya/drop_hack_for_py31

Drop a hack for py31
This commit is contained in:
Takeshi KOMIYA 2018-01-25 10:45:49 +09:00 committed by GitHub
commit 2b56d70423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,8 +224,7 @@ class Sphinx(object):
# the config file itself can be an extension
if self.config.setup:
self._setting_up_extension = ['conf.py']
# py31 doesn't have 'callable' function for below check
if hasattr(self.config.setup, '__call__'):
if callable(self.config.setup):
self.config.setup(self)
else:
raise ConfigError(