aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/xmltodict.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-06-09 12:13:45 +0300
committerFilipp Lepalaan <f@230.to>2013-06-09 12:13:45 +0300
commit1f4ac1d6144dd79606942a742530845658309463 (patch)
tree48e5b6944984fc2a24c145b30265699075af4780 /gsxws/xmltodict.py
parentf454cc6167cd7d91297d6b24187193888ed719ee (diff)
downloadpy-gsxws-1f4ac1d6144dd79606942a742530845658309463.tar.gz
py-gsxws-1f4ac1d6144dd79606942a742530845658309463.tar.bz2
py-gsxws-1f4ac1d6144dd79606942a742530845658309463.zip
Make previous change pass some tests
Diffstat (limited to 'gsxws/xmltodict.py')
-rw-r--r--gsxws/xmltodict.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gsxws/xmltodict.py b/gsxws/xmltodict.py
index c577e55..b8973ae 100644
--- a/gsxws/xmltodict.py
+++ b/gsxws/xmltodict.py
@@ -33,6 +33,10 @@ class XmlDictObject(dict):
if re.search(r'^[YN]$', v):
v = (v == "Y")
+ # convert true/false to boolean
+ if re.search(r'^(true)|(false)$', v):
+ v = (v == "true")
+
# strip currency prefix and munge into float
if re.search(r'Price$', item):
v = float(re.sub(r'[A-Z ,]', '', v))