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 return plugins
def getIPConfig(): def getIPConfig():
ips = socket.gethostbyname_ex(socket.gethostname()) try:
ips[2].append(ips[0]) ips = socket.gethostbyname_ex(socket.gethostname())
return ips[2] ips[2].append(ips[0])
return ips[2]
except Exception as e:
log.exception(e)
return []
def open_browser(): def open_browser():
config = getConfig() config = getConfig()