diff options
Diffstat (limited to 'sphinx/builders/changes.py')
-rw-r--r-- | sphinx/builders/changes.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py index c9317af2..069d0ce6 100644 --- a/sphinx/builders/changes.py +++ b/sphinx/builders/changes.py @@ -12,6 +12,8 @@ import codecs from os import path +from six import iteritems + from sphinx import package_dir from sphinx.util import copy_static_entry from sphinx.locale import _ @@ -93,9 +95,9 @@ class ChangesBuilder(Builder): 'version': version, 'docstitle': self.config.html_title, 'shorttitle': self.config.html_short_title, - 'libchanges': sorted(libchanges.iteritems()), + 'libchanges': sorted(iteritems(libchanges)), 'apichanges': sorted(apichanges), - 'otherchanges': sorted(otherchanges.iteritems()), + 'otherchanges': sorted(iteritems(otherchanges)), 'show_copyright': self.config.html_show_copyright, 'show_sphinx': self.config.html_show_sphinx, } @@ -128,6 +130,9 @@ class ChangesBuilder(Builder): self.env.config.source_encoding) try: lines = f.readlines() + except UnicodeDecodeError: + self.warn('could not read %r for changelog creation' % docname) + continue finally: f.close() targetfn = path.join(self.outdir, 'rst', os_path(docname)) + '.html' @@ -143,7 +148,7 @@ class ChangesBuilder(Builder): finally: f.close() themectx = dict(('theme_' + key, val) for (key, val) in - self.theme.get_options({}).iteritems()) + iteritems(self.theme.get_options({}))) copy_static_entry(path.join(package_dir, 'themes', 'default', 'static', 'default.css_t'), self.outdir, self, themectx) |