diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-15 12:09:18 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-15 12:09:18 +0300 |
commit | 0b2ab0ee81ea9028a8bf0da809d586e36664ec1e (patch) | |
tree | 89a5f66e68706e5741cec1d202a277cec8459d8c /gsxws/core.py | |
parent | 47db98b2449009f8bf80fe9d30fb6bfe4a331341 (diff) | |
download | py-gsxws-0b2ab0ee81ea9028a8bf0da809d586e36664ec1e.tar.gz py-gsxws-0b2ab0ee81ea9028a8bf0da809d586e36664ec1e.tar.bz2 py-gsxws-0b2ab0ee81ea9028a8bf0da809d586e36664ec1e.zip |
Dont' set empty values in from_xml()
Diffstat (limited to 'gsxws/core.py')
-rw-r--r-- | gsxws/core.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index 9eed125..ccaf16b 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -357,6 +357,7 @@ class GsxObject(object): obj = GsxObject() for r in el: + newitem = cls.from_xml(r) k, v = r.tag, r.text @@ -386,6 +387,9 @@ class GsxObject(object): if isinstance(v, basestring): + if v == "": + continue # Don't set empty values at all... + v = unicode(v) # "must be unicode, not str" # convert dates to native Python type |