Skip to content

Commit

Permalink
Remove version by slicing tool_id before last slash
Browse files Browse the repository at this point in the history
As pointed out by @nsoranzo, this  may avoid conflicts when the version string
appears more than once in tool_id.
  • Loading branch information
mvdbeek committed Apr 5, 2016
1 parent 9b7be81 commit ab264eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/tools/toolbox/lineages/factory.py
Expand Up @@ -8,8 +8,8 @@ def remove_version_from_guid( guid ):
"""
if "/repos/" not in guid:
return None
tool_version = guid.split("/")[-1]
return guid.split(tool_version)[0]
last_slash = guid.rfind('/')
return guid[:last_slash]


class LineageMap(object):
Expand Down

0 comments on commit ab264eb

Please sign in to comment.