Stop trying to guess a web port from the config since most configs are not INI anymore anyway.

This commit is contained in:
Nate Coraor
2019-07-08 11:43:11 +02:00
parent 906413d07b
commit d187b28951
+1 -14
View File
@@ -645,7 +645,7 @@ class GalaxyAppConfiguration(BaseAppConfiguration):
# so dependending on the context a better default can be used (
# request url in a web thread, Docker parent in IE stuff, etc...)
galaxy_infrastructure_url = "http://localhost"
web_port = self.galaxy_infrastructure_web_port or self.guess_galaxy_port()
web_port = self.galaxy_infrastructure_web_port
if web_port:
galaxy_infrastructure_url += ":%s" % (web_port)
galaxy_infrastructure_url_set = False
@@ -955,19 +955,6 @@ class GalaxyAppConfiguration(BaseAppConfiguration):
"""
return resolve_path(path, self.root)
def guess_galaxy_port(self):
# Code derived from Jupyter work ie.mako
config = configparser.SafeConfigParser({'port': '8080'})
if self.config_file:
config.read(self.config_file)
try:
port = config.getint('server:%s' % self.server_name, 'port')
except Exception:
# uWSGI galaxy installations don't use paster and only speak uWSGI not http
port = None
return port
@staticmethod
def _parse_allowed_origin_hostnames(kwargs):
"""