From b6ab05bd13a498204ae322c9d9fd1eb5ec6abb30 Mon Sep 17 00:00:00 2001 From: Mike Kazantsev Date: Mon, 11 Feb 2013 13:56:04 +0100 Subject: skype: handle only socket errors in send() --- protocols/skype/skyped.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/skype/skyped.py') diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index ae4df6a2..19de51aa 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -129,7 +129,7 @@ def send(sock, txt, tries=10): if not options.conn: return try: sock.sendall(txt) - except Exception, s: + except socket.error as s: dprint("Warning, sending '%s' failed (%s)." % (txt, s)) options.conn.close() options.conn = False @@ -140,7 +140,7 @@ def send(sock, txt, tries=10): try: if options.conn: sock.sendall(txt) options.lock.release() - except Exception, s: + except socket.error as s: options.lock.release() dprint("Warning, sending '%s' failed (%s). count=%d" % (txt, s, count)) time.sleep(1) -- cgit v1.2.3