From c1d410267bab41707276bee4ee749f182ccc259d Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 12 Oct 2013 23:36:43 +0200 Subject: [PATCH] Fix two function in case of None element --- feeds.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/feeds.py b/feeds.py index d0d2b2d..764bc7a 100644 --- a/feeds.py +++ b/feeds.py @@ -90,7 +90,7 @@ class FeedBase(object): """ Returns the .text of the 1st match """ match = self.xget(path) if match is not None: - return match.text + return match.text or "" else: return "" @@ -199,6 +199,9 @@ class FeedList(object): self.parent.root.append(new.xml) self._children[id(new.xml)] = new + if cousin is None: + return new + for key in self.childClass.__dict__: if key[:3] == 'set': attr = key[3:].lower()