aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/core.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-05-13 20:04:21 +0300
committerFilipp Lepalaan <f@230.to>2013-05-13 20:04:21 +0300
commitd020b5d452b85becd77b1d1a76e01751c8aa2f05 (patch)
treec7863ee983fec074aad6793d000809428ab93d69 /gsxws/core.py
parent4ebc7f7eae508fcf5a3031e1eeadba4183589136 (diff)
downloadpy-gsxws-d020b5d452b85becd77b1d1a76e01751c8aa2f05.tar.gz
py-gsxws-d020b5d452b85becd77b1d1a76e01751c8aa2f05.tar.bz2
py-gsxws-d020b5d452b85becd77b1d1a76e01751c8aa2f05.zip
Fix bool type check in GsxObject
Diffstat (limited to 'gsxws/core.py')
-rw-r--r--gsxws/core.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/gsxws/core.py b/gsxws/core.py
index 4e35c76..2579310 100644
--- a/gsxws/core.py
+++ b/gsxws/core.py
@@ -300,6 +300,9 @@ class GsxObject(object):
value = base64.b64encode(value.read())
+ if isinstance(value, bool):
+ value = "Y" if value else "N"
+
if isinstance(value, int):
value = str(value)
@@ -309,12 +312,6 @@ class GsxObject(object):
if isinstance(value, time):
value = value.strftime(self._formats['tf'])
- if isinstance(value, bool):
- value = "Y" if value else "N"
-
- if isinstance(value, date):
- value = value.strftime(self._formats['df'])
-
self._data[name] = value
def __getattr__(self, name):