From 966559bdd381f1802c15274639f241f97936bf99 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 11 Nov 2018 16:33:36 +0100 Subject: [PATCH] feeds: fix remove function in case of no match --- morss/feeds.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/morss/feeds.py b/morss/feeds.py index 5d73dfe..669891d 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -328,7 +328,10 @@ class ParserXML(ParserBase): match = self.rule_search(rule) - if key is not None: + if match is None: + return + + elif key is not None: del x.attrib[key] else: