From eb6c0e410e600171fa3ce4fffb78bc205aad5292 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 17 Feb 2017 15:34:52 -0500 Subject: [PATCH] Rework preserve python environment expression according to :eagle::eyes: suggestion. https://github.com/galaxyproject/galaxy/pull/3630#discussion_r101798306 --- lib/galaxy/tools/__init__.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index d4dcd3694db..7063b00169e 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -490,11 +490,9 @@ class Tool( object, Dictifiable ): else: unversioned_legacy_tool = self.old_id in GALAXY_LIB_TOOLS_UNVERSIONED versioned_legacy_tool = self.old_id in GALAXY_LIB_TOOLS_VERSIONED - legacy_tool = unversioned_legacy_tool or versioned_legacy_tool - if not legacy_tool: - return False - else: - return unversioned_legacy_tool or self.version_object < GALAXY_LIB_TOOLS_VERSIONED[self.old_id] + legacy_tool = unversioned_legacy_tool or \ + (versioned_legacy_tool and self.version_object < GALAXY_LIB_TOOLS_VERSIONED[self.old_id]) + return legacy_tool def __get_job_tool_configuration(self, job_params=None): """Generalized method for getting this tool's job configuration.