Skip to content
Snippets Groups Projects
Commit 87a9710d authored by Sébastien Helleu's avatar Sébastien Helleu
Browse files

Catch exception ValueError in number conversions

parent 890d4fa2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment