Mercurial > libervia-backend
comparison sat/plugins/plugin_exp_list_of_interest.py @ 2940:ef554aca3eb1
plugin list interest: initialise extra with an empty dict if not set in registerPubsub
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 04 May 2019 00:05:11 +0200 |
parents | 782612c7854b |
children | ab2696e34d29 |
comparison
equal
deleted
inserted
replaced
2939:18a98a541f7a | 2940:ef554aca3eb1 |
---|---|
96 @param element(domish.Element, None): element to attach | 96 @param element(domish.Element, None): element to attach |
97 may be used to cache some extra data | 97 may be used to cache some extra data |
98 @param extra(dict, None): extra data, key can be: | 98 @param extra(dict, None): extra data, key can be: |
99 - thumb_url: http(s) URL of a thumbnail | 99 - thumb_url: http(s) URL of a thumbnail |
100 """ | 100 """ |
101 if extra is None: | |
102 extra = {} | |
101 yield self.createNode(client) | 103 yield self.createNode(client) |
102 interest_elt = domish.Element((NS_LIST_INTEREST, u"interest")) | 104 interest_elt = domish.Element((NS_LIST_INTEREST, u"interest")) |
103 interest_elt[u"namespace"] = namespace | 105 interest_elt[u"namespace"] = namespace |
104 if name is not None: | 106 if name is not None: |
105 interest_elt[u'name'] = name | 107 interest_elt[u'name'] = name |