Skip to content

Commit

Permalink
Don't fail if a repository is already installed
Browse files Browse the repository at this point in the history
If an repository is already installed `installed_tool_shed_repositories` is None and this does not work with map.
  • Loading branch information
bgruening committed Nov 14, 2015
1 parent 19f5749 commit 7e67368
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/galaxy/webapps/galaxy/api/tool_shed_repositories.py
Expand Up @@ -250,8 +250,10 @@ def to_dict( tool_shed_repository ):
action='show',
id=trans.security.encode_id( tool_shed_repository.id ) )
return tool_shed_repository_dict

return map( to_dict, installed_tool_shed_repositories )
if installed_tool_shed_repositories:
return map( to_dict, installed_tool_shed_repositories )
message = "No repositories were installed, possibly because the selected repository has already been installed."
return dict( status="ok", message=message )

@expose_api
def install_repository_revisions( self, trans, payload, **kwd ):
Expand Down

0 comments on commit 7e67368

Please sign in to comment.