From d187b289518288eb595ccc777bf67bce716defd6 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Mon, 8 Jul 2019 11:43:11 +0200 Subject: [PATCH] Stop trying to guess a web port from the config since most configs are not INI anymore anyway. --- lib/galaxy/config/__init__.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index 0b004ed9a74..739da1e2551 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -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): """