From 8a648dc872844ab77453858bc003655b3110e1c7 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 11 Sep 2013 20:55:16 +0300 Subject: Return empty string on non-existent attribute --- gsxws/objectify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gsxws') diff --git a/gsxws/objectify.py b/gsxws/objectify.py index 0fe2e1f..6347eb1 100644 --- a/gsxws/objectify.py +++ b/gsxws/objectify.py @@ -82,10 +82,10 @@ class GsxElement(objectify.ObjectifiedElement): """ The XML returned by GSX can be pretty inconsistent, especially between the different environments. It's therefore more - practical to return None than to expect AttributeErrors all + practical to return and empty string than to expect AttributeErrors all over your application. """ - return + return '' if isinstance(result, objectify.NumberElement): return result.pyval -- cgit v1.2.3