Skip to content

Commit

Permalink
Allow changing selectors. Closes #169.
Browse files Browse the repository at this point in the history
There's no reason to prevent changing selectors at any time.
Assert should not be used for runtime checks.
  • Loading branch information
TkTech committed Aug 27, 2020
1 parent 17a93ad commit 281c63f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions flask_babel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ def localeselector(self, f):
This has to return the locale as string (eg: ``'de_AT'``, ``'en_US'``)
"""
assert self.locale_selector_func is None, \
'a localeselector function is already registered'
self.locale_selector_func = f
return f

Expand All @@ -133,8 +131,6 @@ def timezoneselector(self, f):
This has to return the timezone as string (eg: ``'Europe/Vienna'``)
"""
assert self.timezone_selector_func is None, \
'a timezoneselector function is already registered'
self.timezone_selector_func = f
return f

Expand Down

0 comments on commit 281c63f

Please sign in to comment.