mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
added stanza.get(key, defaultvalue)
This commit is contained in:
parent
2193d5c962
commit
d14045f5a6
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,12 @@ class ElementBase(object):
|
|||
self.xml.remove(aff.xml)
|
||||
return aff
|
||||
|
||||
def get(self, key, defaultvalue=None):
|
||||
value = self[key]
|
||||
if value is None or value == '':
|
||||
return defaultvalue
|
||||
return value
|
||||
|
||||
def keys(self):
|
||||
out = []
|
||||
out += [x for x in self.interfaces]
|
||||
|
|
Loading…
Reference in a new issue