mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
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 <actions> tag set or an <actions_group> tag set.
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user