From 87a9710d1d46918ad4bf4bd241b363b1908fab9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 15 Jul 2014 07:54:41 +0200 Subject: [PATCH] Catch exception ValueError in number conversions --- qweechat/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qweechat/network.py b/qweechat/network.py index 2495a5e..9cb3a0e 100644 --- a/qweechat/network.py +++ b/qweechat/network.py @@ -123,13 +123,13 @@ class Network(QtCore.QObject): self._server = server try: self._port = int(port) - except: + except ValueError: self._port = 0 self._ssl = ssl self._password = password try: self._lines = int(lines) - except: + except ValueError: self._lines = config.CONFIG_DEFAULT_RELAY_LINES if self._socket.state() == QtNetwork.QAbstractSocket.ConnectedState: return