Skip to content

Commit

Permalink
Fix for getting shed_config_dict when an old/invalid shed_config_file…
Browse files Browse the repository at this point in the history
…name has been stored. Fixes issue updating repositories that have had shed_tool_conf.xml changed since installation.
  • Loading branch information
blankenberg committed Dec 4, 2015
1 parent f34d701 commit e186b6a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/galaxy/model/tool_shed_install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ def get_shed_config_dict( self, app, default=None ):
Return the in-memory version of the shed_tool_conf file, which is stored in the config_elems entry
in the shed_tool_conf_dict.
"""
if not self.shed_config_filename:

def _is_valid_shed_config_filename( filename ):
for shed_tool_conf_dict in app.toolbox.dynamic_confs( include_migrated_tool_conf=True ):
if filename == shed_tool_conf_dict[ 'config_filename' ]:
return True
return False

if not self.shed_config_filename or not _is_valid_shed_config_filename( self.shed_config_filename ):
self.guess_shed_config( app, default=default )
if self.shed_config_filename:
for shed_tool_conf_dict in app.toolbox.dynamic_confs( include_migrated_tool_conf=True ):
Expand Down

0 comments on commit e186b6a

Please sign in to comment.