mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
utils: Handle removal of axes.get_version()
This was removed from django-axes 5.0.13 with introduction of setuptools-scm. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
bb3b32fd69
commit
f46b7ae2a6
@ -149,4 +149,10 @@ def is_axes_old():
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
import axes
|
import axes
|
||||||
return LooseVersion(axes.get_version()) < LooseVersion('5.0')
|
try:
|
||||||
|
version = axes.get_version()
|
||||||
|
except AttributeError:
|
||||||
|
# axes.get_version() was removed in 5.0.13
|
||||||
|
return False
|
||||||
|
|
||||||
|
return LooseVersion(version) < LooseVersion('5.0')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user