feeds: handle several errors
parent
a32f5a8536
commit
3c7f512583
|
@ -269,7 +269,14 @@ class ParserBase(object):
|
|||
|
||||
except AttributeError:
|
||||
# does not exist, have to create it
|
||||
try:
|
||||
self.rule_create(self.rules[rule_name])
|
||||
|
||||
except AttributeError:
|
||||
# no way to create it, give up
|
||||
pass
|
||||
|
||||
else:
|
||||
self.rule_set(self.rules[rule_name], value)
|
||||
|
||||
def rmv(self, rule_name):
|
||||
|
@ -469,6 +476,9 @@ class ParserHTML(ParserXML):
|
|||
element = deepcopy(match)
|
||||
match.getparent().append(element)
|
||||
|
||||
else:
|
||||
raise AttributeError('no way to create item')
|
||||
|
||||
|
||||
def parse_time(value):
|
||||
if value is None or value == 0:
|
||||
|
|
Loading…
Reference in New Issue