[utils] I18N: fix for Python 2.6
Using zipfile directly as a context manager is not supported until Python 2.7
This commit is contained in:
parent
1aee79da3e
commit
b42444d38b
@ -2541,7 +2541,7 @@ class I18N(object):
|
||||
except KeyError:
|
||||
zinfo = None
|
||||
if zinfo is not None:
|
||||
with zipf.open(zinfo) as mo_file:
|
||||
with contextlib.closing(zipf.open(zinfo)) as mo_file:
|
||||
t = gettext.GNUTranslations(mo_file)
|
||||
zipf.close()
|
||||
return t
|
||||
|
Loading…
x
Reference in New Issue
Block a user