Skip to content
Commit 0fa14849 authored by hydrargyrum's avatar hydrargyrum
Browse files

weboob.capabilities.base: use int.__str__ as IntEnum.__str__ for compat

Python 2's json module stringifies values using the builtin str()
function, so any custom __str__ function will be used instead of the
number representation:

  json.dumps([AccountType.CHECKING])

will then return invalid JSON "[CHECKING]" instead of "[1]". By
enforcing use of int.__str__, the previous behavior is restored.

See https://bugs.python.org/issue18264 (it's fixed in Python 3).
parent f1f8b928
Pipeline #278635841 failed with stages
in 1 hour, 2 minutes, and 1 second