From acf580fdb0852a5a043012af4291960ad8cd0efc Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Fri, 1 Nov 2013 11:53:44 -0400 Subject: [PATCH] Return an error response rather than just logging a message when uploading a directroy or a tarball that contains a tool dependency definition that is missing wither an tag set or an tag set. --- lib/galaxy/webapps/tool_shed/controllers/upload.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/webapps/tool_shed/controllers/upload.py b/lib/galaxy/webapps/tool_shed/controllers/upload.py index 8d0d822c7e3..3d3751d9a5c 100644 --- a/lib/galaxy/webapps/tool_shed/controllers/upload.py +++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py @@ -295,9 +295,8 @@ class UploadController( BaseUIController ): elif os.path.split( uploaded_file_name )[ -1 ] == suc.TOOL_DEPENDENCY_DEFINITION_FILENAME: # Inspect the contents of the file to see if changeset_revision values are missing and if so, set them appropriately. altered, root_elem, error_message = commit_util.handle_tool_dependencies_definition( trans, uploaded_file_name ) - # Can this be displayed? if error_message: - log.debug( str( error_message ) ) + return False, error_message, [], '', [], [] if altered: tmp_filename = xml_util.create_and_write_tmp_file( root_elem ) shutil.move( tmp_filename, uploaded_file_name ) @@ -360,8 +359,7 @@ class UploadController( BaseUIController ): # Inspect the contents of the file to see if changeset_revision values are missing and if so, set them appropriately. altered, root_elem, error_message = commit_util.handle_tool_dependencies_definition( trans, uploaded_file_name ) if error_message: - # Can this be displayed? - log.debug( error_message ) + return False, error_message, [], '', [], [] if altered: tmp_filename = xml_util.create_and_write_tmp_file( root_elem ) shutil.move( tmp_filename, uploaded_file_name )