From 273ed82b3222b106717936ecc29d6736f62216e2 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 13 Sep 2013 10:13:53 +0300 Subject: Return None on non-existant elements --- gsxws/objectify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gsxws') diff --git a/gsxws/objectify.py b/gsxws/objectify.py index 6347eb1..e310115 100644 --- a/gsxws/objectify.py +++ b/gsxws/objectify.py @@ -85,7 +85,7 @@ class GsxElement(objectify.ObjectifiedElement): practical to return and empty string than to expect AttributeErrors all over your application. """ - return '' + return None if isinstance(result, objectify.NumberElement): return result.pyval -- cgit v1.2.3