diff options
author | mathieui <mathieui@mathieui.net> | 2017-10-11 23:41:32 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2017-10-11 23:41:32 +0200 |
commit | 38a0e614d46b89316997964f37370ab280c2dbb7 (patch) | |
tree | 1d1806cec7078432dab5aafaaec424530c88a432 | |
parent | 9a7c2c2136e8f928c218456d432b5d367f2c1aa0 (diff) | |
download | poezio-38a0e614d46b89316997964f37370ab280c2dbb7.tar.gz poezio-38a0e614d46b89316997964f37370ab280c2dbb7.tar.bz2 poezio-38a0e614d46b89316997964f37370ab280c2dbb7.tar.xz poezio-38a0e614d46b89316997964f37370ab280c2dbb7.zip |
Narrow the scope of a try/except
-rw-r--r-- | poezio/multiuserchat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/multiuserchat.py b/poezio/multiuserchat.py index 1ed2fa23..92101f23 100644 --- a/poezio/multiuserchat.py +++ b/poezio/multiuserchat.py @@ -14,6 +14,7 @@ slix plugin from xml.etree import cElementTree as ET from poezio.common import safeJID +from slixmpp.exceptions import IqError, IqTimeout import logging log = logging.getLogger(__name__) @@ -144,7 +145,7 @@ def set_user_role(xmpp, jid, nick, reason, role, callback=None): return iq.send(callback=callback) try: return iq.send() - except Exception as e: + except (IqError, IqTimeout) as e: return e.iq def set_user_affiliation(xmpp, muc_jid, affiliation, nick=None, jid=None, reason=None, callback=None): |