aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-07-16 13:45:10 +0300
committerFilipp Lepalaan <f@230.to>2013-07-16 13:45:10 +0300
commit4961dbd10c80ac963bb76fd358342fbb981134ce (patch)
tree555ae1c741f0824943920b3da5ca5af7d6ff5043 /gsxws
parent636ecdff0ab1a01414e7186ffeb8316cdefc545f (diff)
downloadpy-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.tar.gz
py-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.tar.bz2
py-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.zip
Some fixes
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/objectify.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/gsxws/objectify.py b/gsxws/objectify.py
index 979ec33..f1dd7ae 100644
--- a/gsxws/objectify.py
+++ b/gsxws/objectify.py
@@ -45,7 +45,6 @@ class GsxElement(StringElement):
class GsxDateElement(GsxElement):
@property
def pyval(self):
- # looks like some sort of date, let's try to convert
try:
# standard GSX format: "mm/dd/yy"
return datetime.strptime(self.text, "%m/%d/%y").date()
@@ -83,7 +82,7 @@ class GsxAttachment(GsxElement):
class GsxDatetimeElement(GsxElement):
@property
def pyval(self):
- #2011-01-27 11:45:01 PST
+ # 2011-01-27 11:45:01 PST
# Unfortunately we have to chomp off the TZ info...
m = re.search(r'^(\d+\-\d+\-\d+ \d+:\d+:\d+) (\w+)$', self.text)
ts, tz = m.groups()
@@ -116,7 +115,7 @@ class GsxClassLookup(objectify.ObjectifyElementClassLookup):
def parse(root, response):
"""
- >>> parse('/tmp/authenticate.xml', 'AuthenticateResponse').userSessionId
+ >>> parse('../tests/warranty_status.xml', 'warrantyDetailInfo').estimatedPurchaseDate
Sdt7tXp2XytTEVwHBeDx6lHTXI3w9s+M
"""
parser = objectify.makeparser(remove_blank_text=True)