From 2b4369a26ecefa3ef12c3b3cbfc8f3798e9fc126 Mon Sep 17 00:00:00 2001 From: Justin Shepherd Date: Fri, 12 Aug 2011 17:32:32 -0500 Subject: [PATCH] Bug Fix lp:825493 Added gettext support in glance/common/client.py Change-Id: I6933cae26646050de1ef7b05724d1c77fa88b2cf --- glance/common/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glance/common/client.py b/glance/common/client.py index b30196b2e7..b5304eebc6 100644 --- a/glance/common/client.py +++ b/glance/common/client.py @@ -3,6 +3,12 @@ import logging import socket import urllib +# See http://code.google.com/p/python-nose/issues/detail?id=373 +# The code below enables glance.client standalone to work with i18n _() blocks +import __builtin__ +if not hasattr(__builtin__, '_'): + setattr(__builtin__, '_', lambda x: x) + from glance.common import exception