From 9404f633d4203626c70ebf86876bd0a92e22ec3d Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Tue, 19 Aug 2014 06:59:45 +0900 Subject: [PATCH] fix for py26. --- sphinx/util/i18n.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index fa477a695..8e61c12b1 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):