From ecb91209d861a12a751ef17a6b6f5aae2ca495ce Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 2 Jul 2015 20:43:02 +0000 Subject: [PATCH] Only define CONTEXT_SEPARATOR once Replace 2 of 3 definitions of CONTEXT_SEPARATOR with a reference to the variable in _message.py. Change-Id: I37020ca7cf26b523d3739b5613ea5d9be9051e0a --- oslo_i18n/_factory.py | 2 +- oslo_i18n/tests/test_factory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oslo_i18n/_factory.py b/oslo_i18n/_factory.py index 886798a..7d6c7e4 100644 --- a/oslo_i18n/_factory.py +++ b/oslo_i18n/_factory.py @@ -31,7 +31,7 @@ __all__ = [ ] # magic gettext number to separate context from message -CONTEXT_SEPARATOR = "\x04" +CONTEXT_SEPARATOR = _message.CONTEXT_SEPARATOR class TranslatorFactory(object): diff --git a/oslo_i18n/tests/test_factory.py b/oslo_i18n/tests/test_factory.py index 5d1373f..8a3599d 100644 --- a/oslo_i18n/tests/test_factory.py +++ b/oslo_i18n/tests/test_factory.py @@ -23,7 +23,7 @@ from oslo_i18n import _lazy from oslo_i18n import _message # magic gettext number to separate context from message -CONTEXT_SEPARATOR = "\x04" +CONTEXT_SEPARATOR = _message.CONTEXT_SEPARATOR class TranslatorFactoryTest(test_base.BaseTestCase):