diff options
author | mathieui <mathieui@mathieui.net> | 2017-10-12 01:23:40 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2017-10-12 01:23:40 +0200 |
commit | 3317604c6544a488bec749c06a52382971b60790 (patch) | |
tree | c7a8ff4b7019c6b1ab2a69f657dc4c5867ffd29c /poezio/core/commands.py | |
parent | b29b70da0ff89fc24b2118c047f2071edcd36384 (diff) | |
download | poezio-3317604c6544a488bec749c06a52382971b60790.tar.gz poezio-3317604c6544a488bec749c06a52382971b60790.tar.bz2 poezio-3317604c6544a488bec749c06a52382971b60790.tar.xz poezio-3317604c6544a488bec749c06a52382971b60790.zip |
Fix some excepts (bare, useless, unused)
Diffstat (limited to 'poezio/core/commands.py')
-rw-r--r-- | poezio/core/commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py index c256ccab..b08a082f 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -9,6 +9,8 @@ log = logging.getLogger(__name__) import os from xml.etree import cElementTree as ET +from slixmpp.exceptions import XMPPError +from slixmpp.xmlstream.xmlstream import NotConnectedError from slixmpp.xmlstream.stanzabase import StanzaBase from slixmpp.xmlstream.handler import Callback from slixmpp.xmlstream.matcher import StanzaPath @@ -157,7 +159,7 @@ class CommandCore: pres = self.core.xmpp.make_presence(pto=jid, ptype=ptype, pstatus=status) self.core.events.trigger('send_normal_presence', pres) pres.send() - except: + except (XMPPError, NotConnectedError): self.core.information('Could not send directed presence', 'Error') log.debug('Could not send directed presence to %s', jid, exc_info=True) return |