From 338020f2a5203afad239e3a1b6e0becf7edad22b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 10 Jan 2019 16:38:58 +0100 Subject: [PATCH 1/2] Fix error in view_tool_metadata (https://sentry.galaxyproject.org/sentry/toolshed/issues/294272/) --- lib/galaxy/webapps/tool_shed/controllers/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/tool_shed/controllers/repository.py b/lib/galaxy/webapps/tool_shed/controllers/repository.py index 3cfe6cb283b..35e61b83895 100644 --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -2931,7 +2931,7 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings): if message: status = 'error' else: - tool, message, sample_files = \ + tool, valid, message, sample_files = \ tv.handle_sample_files_and_load_tool_from_tmp_config(repo, repository_id, changeset_revision, From 141c2a1ef37ae29b4c6e481337c6efd3a41fcd1d Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Thu, 10 Jan 2019 16:16:56 +0000 Subject: [PATCH 2/2] Fix indentation Broken in commit cf2645f9a658c5e122fea0309bf73a1f64590c39 . --- lib/galaxy/webapps/tool_shed/controllers/repository.py | 8 ++++---- lib/tool_shed/tools/tool_validator.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/webapps/tool_shed/controllers/repository.py b/lib/galaxy/webapps/tool_shed/controllers/repository.py index 35e61b83895..9a9ca34a3e4 100644 --- a/lib/galaxy/webapps/tool_shed/controllers/repository.py +++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py @@ -880,8 +880,8 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings): with ValidationContext.from_app(trans.app) as validation_context: tv = tool_validator.ToolValidator(validation_context) repository, tool, valid, message = tv.load_tool_from_changeset_revision(repository_id, - changeset_revision, - tool_config) + changeset_revision, + tool_config) if message or not valid: status = 'error' tool_state = tool_util.new_state(trans, tool, invalid=not valid) @@ -1772,8 +1772,8 @@ class RepositoryController(BaseUIController, ratings_util.ItemRatings): with ValidationContext.from_app(trans.app) as validation_context: tv = tool_validator.ToolValidator(validation_context) repository, tool, valid, error_message = tv.load_tool_from_changeset_revision(repository_id, - changeset_revision, - tool_config) + changeset_revision, + tool_config) tool_state = tool_util.new_state(trans, tool, invalid=True) invalid_file_tups = [] if tool: diff --git a/lib/tool_shed/tools/tool_validator.py b/lib/tool_shed/tools/tool_validator.py index 5302e45759c..8a6296cbec2 100644 --- a/lib/tool_shed/tools/tool_validator.py +++ b/lib/tool_shed/tools/tool_validator.py @@ -225,7 +225,7 @@ class ToolValidator(object): # Load entries into the tool_data_tables if the tool requires them. tool_data_table_config = os.path.join(work_dir, 'tool_data_table_conf.xml') error, message = self.stdtm.handle_sample_tool_data_table_conf_file(tool_data_table_config, - persist=False) + persist=False) manifest_ctx, ctx_file = hg_util.get_ctx_file_path_from_manifest(tool_config_filename, repo, changeset_revision) if manifest_ctx and ctx_file: tool, valid, message2 = self.load_tool_from_tmp_config(repo, repository_id, manifest_ctx, ctx_file, work_dir)