Don't crash if IP listing fails. Thanks @JeLuf

This commit is contained in:
cmdr2 2022-12-22 15:43:25 +05:30
parent c2bcf89f9a
commit d8b79d8b5c

View File

@ -142,9 +142,13 @@ def getUIPlugins():
return plugins
def getIPConfig():
ips = socket.gethostbyname_ex(socket.gethostname())
ips[2].append(ips[0])
return ips[2]
try:
ips = socket.gethostbyname_ex(socket.gethostname())
ips[2].append(ips[0])
return ips[2]
except Exception as e:
log.exception(e)
return []
def open_browser():
config = getConfig()