Commit 94a8f926 authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed syntax

parent a438cd25
...@@ -1316,15 +1316,15 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton): ...@@ -1316,15 +1316,15 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
if stun_server_list: if stun_server_list:
for server in stun_server_list.split(","): for server in stun_server_list.split(","):
try: try:
(host, port) = server.strip().split(':') (host, port) = server.strip().split(':')
except ValueError: except ValueError:
host = server host = server
port = STUNServerAddress.default_port port = STUNServerAddress.default_port
else: else:
try: try:
int(port) int(port)
except (TypeError, ValueError) as e: except (TypeError, ValueError) as e:
port = STUNServerAddress.default_port port = STUNServerAddress.default_port
try: try:
new_stun_server_list.append(STUNServerAddress(host, port)) new_stun_server_list.append(STUNServerAddress(host, port))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment