Skip to content

Commit

Permalink
Merge pull request #346 from mozilla-services/deprecated_i18n
Browse files Browse the repository at this point in the history
Remove superfluous call to get_localizer (ref #206)
  • Loading branch information
Natim committed Jan 18, 2016
2 parents 81b73c2 + 392ea94 commit 52132be
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cornice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
)
from cornice.util import ContentTypePredicate
from pyramid.events import BeforeRender, NewRequest
from pyramid.i18n import get_localizer
from pyramid.httpexceptions import HTTPNotFound, HTTPForbidden
from pyramid.security import NO_PERMISSION_REQUIRED

Expand Down Expand Up @@ -52,8 +51,6 @@ def set_localizer_for_languages(event, available_languages,
accepted = request.accept_language
locale = accepted.best_match(available_languages, default_locale_name)
request._LOCALE_ = locale
localizer = get_localizer(request)
request.localizer = localizer


def setup_localization(config):
Expand Down

0 comments on commit 52132be

Please sign in to comment.