diff options
author | shimizukawa <shimizukawa@gmail.com> | 2014-08-19 06:59:45 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2014-08-19 06:59:45 +0900 |
commit | f36f34919dcf6c9e25fd31e87a1b38adb7691958 (patch) | |
tree | a2c876e63cf5897b83dfb105f7b3e09bcf54e9d1 /sphinx/util | |
parent | 028f6abde7ed401118d36cfe9dc5641dab582992 (diff) | |
download | sphinx-f36f34919dcf6c9e25fd31e87a1b38adb7691958.tar.gz |
fix for py26.
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/i18n.py | 5 |
1 files changed, 3 insertions, 2 deletions
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):
|