mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Drop unused codes
This commit is contained in:
parent
f3aa62e685
commit
0f47b1d09d
@ -207,15 +207,11 @@ 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__'):
|
||||
self.config.setup(self)
|
||||
else:
|
||||
raise ConfigError(
|
||||
_("'setup' that is specified in the conf.py has not been "
|
||||
"callable. Please provide a callable `setup` function "
|
||||
"in order to behave as a sphinx extension conf.py itself.")
|
||||
)
|
||||
raise ConfigError(
|
||||
_("'setup' that is specified in the conf.py has not been "
|
||||
"callable. Please provide a callable `setup` function "
|
||||
"in order to behave as a sphinx extension conf.py itself.")
|
||||
)
|
||||
|
||||
# now that we know all config values, collect them from conf.py
|
||||
self.config.init_values()
|
||||
|
@ -135,10 +135,6 @@ def execfile_(filepath, _globals, open=open):
|
||||
with open(filepath, mode) as f:
|
||||
source = f.read()
|
||||
|
||||
# py26 accept only LF eol instead of CRLF
|
||||
if sys.version_info[:2] == (2, 6):
|
||||
source = source.replace(b'\r\n', b'\n')
|
||||
|
||||
# compile to a code object, handle syntax errors
|
||||
filepath_enc = filepath.encode(fs_encoding)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user