aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/objectify.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/gsxws/objectify.py b/gsxws/objectify.py
index a1856d9..5658d1a 100644
--- a/gsxws/objectify.py
+++ b/gsxws/objectify.py
@@ -77,13 +77,21 @@ def gsx_timestamp(value):
class GsxElement(objectify.ObjectifiedElement):
def __getattribute__(self, name):
- result = super(GsxElement, self).__getattribute__(name)
+ try:
+ result = super(GsxElement, self).__getattribute__(name)
+ except AttributeError:
+ """
+ The XML returned by GSX can be pretty inconsistent, especially
+ between the different environments. It's therefore more
+ practical to return None than to look for AttributeErrors all
+ over your application...
+ """
+ return
if isinstance(result, objectify.NumberElement):
return result.pyval
if isinstance(result, objectify.StringElement):
-
name = result.tag
result = result.text