From b75583ea26269101f12cb29df76a23eeecf68ab5 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Thu, 9 Nov 2017 14:00:46 -0500 Subject: [PATCH] Fix post-merge lint issues --- lib/galaxy/config.py | 1 + lib/galaxy/jobs/__init__.py | 2 +- lib/galaxy/model/orm/scripts.py | 1 - lib/galaxy/util/properties.py | 1 - lib/galaxy/web/stack/transport.py | 2 +- lib/galaxy/webapps/galaxy/buildapp.py | 2 -- scripts/galaxy-main | 1 - scripts/get_uwsgi_args.py | 1 - scripts/manage_tool_dependencies.py | 1 - 9 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index b2408b28940..cd3c8045869 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -115,6 +115,7 @@ LOGGING_CONFIG_DEFAULT = { }, } + def resolve_path(path, root): """If 'path' is relative make absolute by prepending 'root'""" if not os.path.isabs(path): diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index 65ab2fea65a..b0dee6c9a87 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -207,7 +207,7 @@ class JobConfiguration(object, ConfiguresHandlers): # Determine the default handler(s) try: self.default_handler_id = self._get_default(self.app.config, handlers_conf, list(self.handlers.keys())) - except: + except Exception: log.info('No default handler specified in job config, will check for job handlers managed by application stack') if ((self.default_handler_id is None or (len(self.handlers) == 1 and self.app.config.server_name.startswith(self.handlers.keys()[0]))) diff --git a/lib/galaxy/model/orm/scripts.py b/lib/galaxy/model/orm/scripts.py index c37606b26d9..7a9ae93fbfc 100644 --- a/lib/galaxy/model/orm/scripts.py +++ b/lib/galaxy/model/orm/scripts.py @@ -3,7 +3,6 @@ Code to support database helper scripts (create_db.py, manage_db.py, etc...). """ import logging -from galaxy.util import listify from galaxy.util.path import get_ext from galaxy.util.properties import find_config_file, load_app_properties diff --git a/lib/galaxy/util/properties.py b/lib/galaxy/util/properties.py index aca80d4c1e8..aedfcc27e30 100644 --- a/lib/galaxy/util/properties.py +++ b/lib/galaxy/util/properties.py @@ -13,7 +13,6 @@ import yaml from six import iteritems, string_types from six.moves.configparser import ConfigParser -from galaxy.util import listify from galaxy.util.path import has_ext, extensions, joinext diff --git a/lib/galaxy/web/stack/transport.py b/lib/galaxy/web/stack/transport.py index 394e2a36cd5..c24ab1ef756 100644 --- a/lib/galaxy/web/stack/transport.py +++ b/lib/galaxy/web/stack/transport.py @@ -116,7 +116,7 @@ class UWSGIFarmMessageTransport(ApplicationStackTransport): self.running = False else: self.dispatcher.dispatch(msg) - except: + except Exception: log.exception('Exception in mule message handling') finally: self.__unlock(lock) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 79620698b0f..4a993dcc899 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -3,13 +3,11 @@ Provides factory methods to assemble the Galaxy web application """ import atexit import logging -import os import sys import threading import traceback from paste import httpexceptions -from six.moves import configparser import galaxy.app import galaxy.datatypes.registry diff --git a/scripts/galaxy-main b/scripts/galaxy-main index e9ee97b918c..4c82e41ecfb 100755 --- a/scripts/galaxy-main +++ b/scripts/galaxy-main @@ -200,7 +200,6 @@ class GalaxyConfigBuilder(object): config_file, dict(__file__=config_file, here=os.path.dirname(config_file)) ) - root = logging.getLogger() def main(): diff --git a/scripts/get_uwsgi_args.py b/scripts/get_uwsgi_args.py index 17a5eee40d0..7becdeea3af 100644 --- a/scripts/get_uwsgi_args.py +++ b/scripts/get_uwsgi_args.py @@ -11,7 +11,6 @@ sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pa from galaxy.script import main_factory from galaxy.util.path import get_ext from galaxy.util.properties import load_app_properties, nice_config_parser -from galaxy.web.stack import get_app_kwds DESCRIPTION = "Script to determine uWSGI command line arguments" diff --git a/scripts/manage_tool_dependencies.py b/scripts/manage_tool_dependencies.py index 9994dcbb51a..485edf85331 100644 --- a/scripts/manage_tool_dependencies.py +++ b/scripts/manage_tool_dependencies.py @@ -11,7 +11,6 @@ from galaxy.config import ( ) from galaxy.script import main_factory from galaxy.tools.deps import CachedDependencyManager, DependencyManager, NullDependencyManager -from galaxy.util.properties import find_config_file, load_app_properties DESCRIPTION = "Script to manage tool dependencies (with focus on a Conda environments)."