ipv6 compatibility

This commit is contained in:
tangdou1 2019-04-03 19:56:14 +08:00 committed by GitHub
parent dd9ccfa3d2
commit 42de962cbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,10 @@ class UiServer:
from Debug import DebugReloader
self.log.write = lambda msg: self.log.debug(msg.strip()) # For Wsgi access.log
self.log.info("--------------------------------------")
self.log.info("Web interface: http://%s:%s/" % (config.ui_ip, config.ui_port))
if ":" in config.ui_ip:
self.log.info("Web interface: http://[%s]:%s/" % (config.ui_ip, config.ui_port))
else:
self.log.info("Web interface: http://%s:%s/" % (config.ui_ip, config.ui_port))
self.log.info("--------------------------------------")
if config.open_browser and config.open_browser != "False":