diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e9bd33..84bee6d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Change Log ---------- +1.2.1 (2016-11-02) +++++++++++++++++++ + +**Bugfix** + +- Fixed a bug where parsing the values "nan", "inf" or "-inf" would lead to a float value, when handling XML values. While this could potentially be correct, it's safer to assume that these values are in fact string values + 1.2.0 (2016-04-19) ++++++++++++++++++ diff --git a/altapay/utils.py b/altapay/utils.py index cd5bd27..26c5986 100644 --- a/altapay/utils.py +++ b/altapay/utils.py @@ -60,6 +60,8 @@ def handle_xml_value(value): return False elif value.isdigit(): return int(value) + elif value.lower() in ('nan', 'inf', '-inf'): + return value try: return float(value)