diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-13 09:56:16 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-13 09:56:16 +0300 |
commit | 800d8fbbef7e59bb875f3a05d1ddc7969259871f (patch) | |
tree | 37fd9b98f0db0de9c77ab1119b5c1d63311e0797 /gsxws/core.py | |
parent | ead12feab2a148e67b7cdbbfb8beea7aab56dd01 (diff) | |
download | py-gsxws-800d8fbbef7e59bb875f3a05d1ddc7969259871f.tar.gz py-gsxws-800d8fbbef7e59bb875f3a05d1ddc7969259871f.tar.bz2 py-gsxws-800d8fbbef7e59bb875f3a05d1ddc7969259871f.zip |
Return strings as unicode
Diffstat (limited to 'gsxws/core.py')
-rw-r--r-- | gsxws/core.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index 2b4b7be..a33f755 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -327,10 +327,8 @@ class GsxObject(object): k, v = r.tag, r.text if hasattr(obj, k): - # found duplicate tag %s" % k attr = obj.__getattr__(k) - if isinstance(attr, list): # append to existing list newattr = attr.append(newitem) @@ -353,6 +351,9 @@ class GsxObject(object): v = base64.b64decode(v) if isinstance(v, basestring): + + v = unicode(v) # "must be unicode, not str" + # convert dates to native Python type if re.search('^\d{2}/\d{2}/\d{2}$', v): m, d, y = v.split('/') |