]> jfr.im git - irc/weechat/qweechat.git/blobdiff - qweechat/network.py
setup.py: fix entry point
[irc/weechat/qweechat.git] / qweechat / network.py
index 2495a5e92ecc866dd4def6805f89d7a1e4cd75e3..46458a499421ac580ac011eb5226e88582a8e92b 100644 (file)
@@ -2,7 +2,7 @@
 #
 # network.py - I/O with WeeChat/relay
 #
-# Copyright (C) 2011-2014 Sébastien Helleu <flashcode@flashtux.org>
+# Copyright (C) 2011-2016 Sébastien Helleu <flashcode@flashtux.org>
 #
 # This file is part of QWeeChat, a Qt remote GUI for WeeChat.
 #
 
 import struct
 import qt_compat
+import config
+
 QtCore = qt_compat.import_module('QtCore')
 QtNetwork = qt_compat.import_module('QtNetwork')
-import config
 
 _PROTO_INIT_CMD = ['init password=%(password)s']
 
@@ -123,13 +124,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