refactor sphinx.io; SphinxFileInput can expect that app argument is always available

This commit is contained in:
Takeshi KOMIYA 2017-11-15 11:34:52 +09:00
parent a0200ad499
commit aa4fd0e1b7

View File

@ -141,7 +141,8 @@ class SphinxFileInput(FileInput):
def read(self):
# type: () -> unicode
data = FileInput.read(self)
if self.app:
# emit source-read event
arg = [data]
self.app.emit('source-read', self.env.docname, arg)
data = arg[0]