Philipp Hörist pushed to branch master at gajim / python-nbxmpp

Commits:

1 changed file:

Changes:

  • nbxmpp/modules/bookmarks.py
    ... ... @@ -56,10 +56,18 @@ class Bookmarks:
    56 56
             if properties.pubsub_event.node != NS_BOOKMARKS:
    
    57 57
                 return
    
    58 58
     
    
    59
    +        if properties.pubsub_event.deleted or properties.pubsub_event.retracted:
    
    60
    +            return
    
    61
    +
    
    59 62
             item = properties.pubsub_event.item
    
    63
    +        if item is None:
    
    64
    +            return
    
    60 65
     
    
    61
    -        bookmarks = []
    
    62 66
             storage_node = item.getTag('storage', namespace=NS_BOOKMARKS)
    
    67
    +        if storage_node is None:
    
    68
    +            return
    
    69
    +
    
    70
    +        bookmarks = []
    
    63 71
             if storage_node.getChildren():
    
    64 72
                 bookmarks = self._parse_bookmarks(storage_node)
    
    65 73