Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0329.py @ 3032:95e2fd14a761
plugin XEP-0329: fixed ShareNode item() and values after Python 3 port
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Aug 2019 17:06:44 +0200 |
parents | ab2696e34d29 |
children | fee60f17ebac |
comparison
equal
deleted
inserted
replaced
3031:98d1f34ce5b9 | 3032:95e2fd14a761 |
---|---|
103 return self.children.__contains__(item) | 103 return self.children.__contains__(item) |
104 | 104 |
105 def __iter__(self): | 105 def __iter__(self): |
106 return self.children.__iter__() | 106 return self.children.__iter__() |
107 | 107 |
108 def iteritems(self): | 108 def items(self): |
109 return iter(self.children.items()) | 109 return self.children.items() |
110 | 110 |
111 def itervalues(self): | 111 def values(self): |
112 return iter(self.children.values()) | 112 return self.children.values() |
113 | 113 |
114 def getOrCreate(self, name, type_=TYPE_VIRTUAL, access=None): | 114 def getOrCreate(self, name, type_=TYPE_VIRTUAL, access=None): |
115 """Get a node or create a virtual node and return it""" | 115 """Get a node or create a virtual node and return it""" |
116 if access is None: | 116 if access is None: |
117 access = {C.ACCESS_PERM_READ: {KEY_TYPE: C.ACCESS_TYPE_PUBLIC}} | 117 access = {C.ACCESS_PERM_READ: {KEY_TYPE: C.ACCESS_TYPE_PUBLIC}} |