Catch IqTimeout exception when removing a contact from the roster.
This commit is contained in:
parent
828938db9e
commit
bcd6976cd5
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ from roster_sorting import SORTING_METHODS, GROUP_SORTING_METHODS
|
||||||
from os import path as p
|
from os import path as p
|
||||||
from common import safeJID
|
from common import safeJID
|
||||||
from sleekxmpp import JID
|
from sleekxmpp import JID
|
||||||
from sleekxmpp.exceptions import IqError
|
from sleekxmpp.exceptions import IqError, IqTimeout
|
||||||
|
|
||||||
|
|
||||||
class Roster(object):
|
class Roster(object):
|
||||||
|
@ -72,7 +72,7 @@ class Roster(object):
|
||||||
try:
|
try:
|
||||||
self.__node[jid].send_presence(ptype='unavailable')
|
self.__node[jid].send_presence(ptype='unavailable')
|
||||||
self.__node.remove(jid)
|
self.__node.remove(jid)
|
||||||
except IqError:
|
except (IqError, IqTimeout):
|
||||||
import traceback
|
import traceback
|
||||||
log.debug('IqError when removing %s:\n%s', jid, traceback.format_exc())
|
log.debug('IqError when removing %s:\n%s', jid, traceback.format_exc())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue