# HG changeset patch # User Thierry Florac # Date 1518076406 -3600 # Node ID 568ef229cc207e03537701e947e8ab77a1659ec1 # Parent 2be95c766ed01262af128d0702d388418dd8afa5 Updated global registry access diff -r 2be95c766ed0 -r 568ef229cc20 src/pyams_i18n/negotiator.py --- a/src/pyams_i18n/negotiator.py Mon Feb 05 16:30:25 2018 +0100 +++ b/src/pyams_i18n/negotiator.py Thu Feb 08 08:53:26 2018 +0100 @@ -21,9 +21,8 @@ # import packages from pyams_utils.i18n import get_browser_language -from pyams_utils.registry import query_utility, utility_config +from pyams_utils.registry import query_utility, utility_config, get_global_registry from persistent import Persistent -from zope.component.globalregistry import getGlobalSiteManager from zope.container.contained import Contained from zope.i18n.locales import locales from zope.interface import implementer @@ -93,7 +92,7 @@ else: locale_name = get_browser_language(request) if not locale_name: - registry = getGlobalSiteManager() + registry = get_global_registry() locale_name = registry.settings.get('pyramid.default_locale_name', 'en') if '-' in locale_name: # remove 'sub-locale' to prevent Babel and Zope exceptions for unknown locales