These were not updated to use `_download_filename`,
and so this fixes the download name for collection elements
to include the element identifier.
Note that the Data class should handle composite data just
fine.
This fixes https://github.com/galaxyproject/galaxy/issues/6949.
The problem is that `super` would fall back to the BamInputSorted
sniffer, which prevents sniffing. Includes a test file for the new
datatype upload testing framework.
Fixes the following exception:
```
AttributeError: 'NoneType' object has no attribute 'id'
File "galaxy/web/framework/middleware/sentry.py", line 43, in __call__
iterable = self.application(environ, start_response)
File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/translogger.py", line 69, in __call__
return self.application(environ, replacement_start_response)
File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/recursive.py", line 85, in __call__
return self.application(environ, start_response)
File "routes/middleware.py", line 141, in __call__
response = self.app(environ, start_response)
File "/srv/toolshed/main/venv/local/lib/python2.7/site-packages/paste/httpexceptions.py", line 640, in __call__
return self.application(environ, start_response)
File "galaxy/web/framework/base.py", line 143, in __call__
return self.handle_request(environ, start_response)
File "galaxy/web/framework/base.py", line 222, in handle_request
body = method(trans, **kwargs)
File "galaxy/webapps/tool_shed/controllers/repository.py", line 888, in display_tool
tool_state = tool_util.new_state(trans, tool, invalid=False)
File "tool_shed/util/tool_util.py", line 211, in new_state
log.debug('Failed to build tool state for tool "%s" using standard method, will try to fall back on custom method: %s', tool.id, e)
```
(from https://sentry.galaxyproject.org/sentry/toolshed/issues/279820/).
Might also fix some other issues when redering workflow svg for
workflows with invalid tools.
Handling the IOError within the function should result in other call
sites within the kubernets.py module properly setting the job state even
if the job directory has been removed.
Found this by removing the blank try/except in the previous commit.
This only affects testing when python can't determine the correct
locale and falls back to ASCII.
The Lock wasn't actually preventing anything, and I don't think
anything would need ot be protected here. mkdtemp should be thread-safe.
We also remove the try/except Statement. I think it'd be better to
expose any exceptions here instead of producing broken capsules and
logging an exception.