feeds: proceed with conversion when rules do not match
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
b138f11771
commit
32d9bc9d9d
|
@ -186,11 +186,12 @@ class ParserBase(object):
|
||||||
return self.convert(FeedHTML).tostring(**k)
|
return self.convert(FeedHTML).tostring(**k)
|
||||||
|
|
||||||
def convert(self, TargetParser):
|
def convert(self, TargetParser):
|
||||||
if type(self) == TargetParser:
|
|
||||||
return self
|
|
||||||
|
|
||||||
target = TargetParser()
|
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:
|
for attr in target.dic:
|
||||||
if attr == 'items':
|
if attr == 'items':
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
|
|
Loading…
Reference in New Issue