diff options
author | Takayuki Shimizukawa <shimizukawa+bitbucket@gmail.com> | 2014-08-20 06:01:27 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa+bitbucket@gmail.com> | 2014-08-20 06:01:27 +0900 |
commit | f328f0ba0f21ca7ca3b820f3f29886600921a38c (patch) | |
tree | 3bbf3e2d9e06d811a4a104b8aeebe99388a6a0ab | |
parent | 6305c4aef54bd733da99abfa23b47e4a66b1fb61 (diff) | |
parent | d5e3e00005742bbb791ac7ba8c492c891d9320de (diff) | |
download | sphinx-f328f0ba0f21ca7ca3b820f3f29886600921a38c.tar.gz |
Merged in tk0miya/sphinx (pull request #273)
Fix RuntimeError with numbered circular toctree. Closes #1536
-rw-r--r-- | sphinx/ext/napoleon/iterators.py | 6 | ||||
-rw-r--r-- | sphinx/util/i18n.py | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/sphinx/ext/napoleon/iterators.py b/sphinx/ext/napoleon/iterators.py index 90a0a1ac..482fe1dd 100644 --- a/sphinx/ext/napoleon/iterators.py +++ b/sphinx/ext/napoleon/iterators.py @@ -13,12 +13,6 @@ import collections -from six import PY3 - - -if PY3: - callable = lambda o: hasattr(o, '__call__') - class peek_iter(object): """An iterator object that supports peeking ahead. diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index fa477a69..8e61c12b 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -45,8 +45,9 @@ class CatalogInfo(LocaleFileInfoBase): path.getmtime(self.mo_path) < path.getmtime(self.po_path))
def write_mo(self, locale):
- with open(self.po_path, 'rt') as p, open(self.mo_path, 'wb') as m:
- write_mo(m, read_po(p, locale))
+ with open(self.po_path, 'rt') as po:
+ with open(self.mo_path, 'wb') as mo:
+ write_mo(mo, read_po(po, locale))
def get_catalogs(locale_dirs, locale, gettext_compact=False, force_all=False):
|