mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Fix the error on non-number priority
The priority is not a number: we consider it 0 as a default
This commit is contained in:
parent
3625573c7d
commit
93fbcad277
1 changed files with 5 additions and 1 deletions
|
@ -129,7 +129,11 @@ class Presence(RootStanza):
|
||||||
p = self._getSubText('priority')
|
p = self._getSubText('priority')
|
||||||
if not p:
|
if not p:
|
||||||
p = 0
|
p = 0
|
||||||
|
try:
|
||||||
return int(p)
|
return int(p)
|
||||||
|
except ValueError:
|
||||||
|
# The priority is not a number: we consider it 0 as a default
|
||||||
|
return 0
|
||||||
|
|
||||||
def getType(self):
|
def getType(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue