mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1127: Fix traceback when autodoc tries to tokenize a non-Python file.
This commit is contained in:
parent
08839fac68
commit
6feb07951e
1
CHANGES
1
CHANGES
@ -160,6 +160,7 @@ Bugs fixed
|
||||
width, table layout width and text wrap width.
|
||||
* Fix leading space in LaTeX table header cells.
|
||||
* #1132: Fix LaTeX table output for multi-row cells in the first column.
|
||||
* #1127: Fix traceback when autodoc tries to tokenize a non-Python file.
|
||||
* #1126: Fix double-hyphen to en-dash conversion in wrong places such as
|
||||
command-line option names in LaTeX.
|
||||
* #1117: Handle .pyx files in sphinx-apidoc.
|
||||
|
@ -241,7 +241,10 @@ class ModuleAnalyzer(object):
|
||||
"""Generate tokens from the source."""
|
||||
if self.tokens is not None:
|
||||
return
|
||||
try:
|
||||
self.tokens = list(tokenize.generate_tokens(self.source.readline))
|
||||
except tokenize.TokenError, err:
|
||||
raise PycodeError('tokenizing failed', err)
|
||||
self.source.close()
|
||||
|
||||
def parse(self):
|
||||
|
Loading…
Reference in New Issue
Block a user