feeds: proceed with conversion when rules do not match
continuous-integration/drone/push Build is failing Details

master
pictuga 2022-01-24 09:34:57 +00:00
parent b138f11771
commit 32d9bc9d9d
1 changed files with 4 additions and 3 deletions

View File

@ -186,11 +186,12 @@ class ParserBase(object):
return self.convert(FeedHTML).tostring(**k)
def convert(self, TargetParser):
if type(self) == TargetParser:
return self
target = TargetParser()
if type(self) == TargetParser and self.rules == target.rules:
# check both type *AND* rules (e.g. when going from freeform xml to rss)
return self
for attr in target.dic:
if attr == 'items':
for item in self.items: