Skip to content

Commit 281c63f

Browse files
committed
Allow changing selectors. Closes #169.
There's no reason to prevent changing selectors at any time. Assert should not be used for runtime checks.
1 parent 17a93ad commit 281c63f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

flask_babel/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ def localeselector(self, f):
120120
121121
This has to return the locale as string (eg: ``'de_AT'``, ``'en_US'``)
122122
"""
123-
assert self.locale_selector_func is None, \
124-
'a localeselector function is already registered'
125123
self.locale_selector_func = f
126124
return f
127125

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

0 commit comments

Comments
 (0)