diff options
author | Filipp Lepalaan <f@230.to> | 2013-07-16 13:45:10 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-07-16 13:45:10 +0300 |
commit | 4961dbd10c80ac963bb76fd358342fbb981134ce (patch) | |
tree | 555ae1c741f0824943920b3da5ca5af7d6ff5043 /gsxws/objectify.py | |
parent | 636ecdff0ab1a01414e7186ffeb8316cdefc545f (diff) | |
download | py-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.tar.gz py-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.tar.bz2 py-gsxws-4961dbd10c80ac963bb76fd358342fbb981134ce.zip |
Some fixes
Diffstat (limited to 'gsxws/objectify.py')
-rw-r--r-- | gsxws/objectify.py | 5 |
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) |