Python 3: fix a call to ugettext()

In Python 3, ugettext() does not exist and gettext() should be used instead.

Closes-Bug: 128485
Change-Id: Id9f51f0d630ef0c92fc315253c45d3abba356cd1
This commit is contained in:
Cyril Roelandt 2013-12-17 13:39:52 +01:00
parent d5558265cc
commit e193d829d1

View File

@ -16,7 +16,11 @@
import gettext
t = gettext.translation('neutronclient', fallback=True)
try:
ugettext = t.ugettext # Python 2
except AttributeError:
ugettext = t.gettext # Python 3
def _(msg):
return t.ugettext(msg)
return ugettext(msg)