plugin XEP-0277: better resilience to broken items:
- if `author` element can't be found, `publisher` attribute, then `IQ`'s `from` attributes are used as fallback to find author jid - fix categories (tags) parsing if `author` element is not found - remove items which have failed parsing from `mbGet` results (instead of using `None`).
This commit is contained in:
parent
839aea4e2b
commit
69112bcd79
1 changed files with 18 additions and 8 deletions
|
|
@ -1181,7 +1181,10 @@ class XEP_0060(object):
|
|||
log.warning(f"Error while parsing item: {failure_.value}")
|
||||
|
||||
d = defer.gatherResults([item_cb(item).addErrback(eb) for item in items])
|
||||
d.addCallback(lambda parsed_items: (parsed_items, metadata))
|
||||
d.addCallback(lambda parsed_items: (
|
||||
[i for i in parsed_items if i is not None],
|
||||
metadata
|
||||
))
|
||||
return d
|
||||
|
||||
def serDList(self, results, failure_result=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue