From 71360bcac6c26906aa01750d7b9f408b6b7f914c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 29 Mar 2013 18:19:57 +0100 Subject: [PATCH] builders: fix status_iterator backwards compatibility --- sphinx/builders/__init__.py | 7 ++++--- sphinx/builders/gettext.py | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py index f46c358d2..27a3be7a8 100644 --- a/sphinx/builders/__init__.py +++ b/sphinx/builders/__init__.py @@ -107,7 +107,7 @@ class Builder(object): raise NotImplementedError def old_status_iterator(self, iterable, summary, colorfunc=darkgreen, - stringify_func=str): + stringify_func=lambda x: x): l = 0 for item in iterable: if l == 0: @@ -120,9 +120,10 @@ class Builder(object): # new version with progress info def status_iterator(self, iterable, summary, colorfunc=darkgreen, length=0, - stringify_func=str): + stringify_func=lambda x: x): if length == 0: - for item in self.old_status_iterator(iterable, summary, colorfunc): + for item in self.old_status_iterator(iterable, summary, colorfunc, + stringify_func): yield item return l = 0 diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py index 1cede981f..15ee29219 100644 --- a/sphinx/builders/gettext.py +++ b/sphinx/builders/gettext.py @@ -161,9 +161,8 @@ class MessageCatalogBuilder(I18nBuilder): ) for textdomain, catalog in self.status_iterator( self.catalogs.iteritems(), "writing message catalogs... ", - lambda (textdomain, _): darkgreen(textdomain), - len(self.catalogs)): - + darkgreen, len(self.catalogs), + lambda (textdomain, _): textdomain): # noop if config.gettext_compact is set ensuredir(path.join(self.outdir, path.dirname(textdomain)))