commit/galaxy-central: dan: Fix for when a dbkey should be displayed multiple times, but with possibly different names.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6ee45090d5b1/ Changeset: 6ee45090d5b1 Branch: next-stable User: dan Date: 2014-05-21 20:08:04 Summary: Fix for when a dbkey should be displayed multiple times, but with possibly different names. Affected #: 1 file diff -r 20227293c9fe496cf0995f7c194969e785d5ff1e -r 6ee45090d5b1ff8e0cd0497930aa0618133c612d lib/galaxy/util/dbkeys.py --- a/lib/galaxy/util/dbkeys.py +++ b/lib/galaxy/util/dbkeys.py @@ -4,7 +4,6 @@ #dbkeys read from disk using builds.txt from galaxy.util import dbnames from galaxy.util.json import from_json_string -from galaxy.util.odict import odict import os.path @@ -16,10 +15,10 @@ self._app = app self._data_table_name = data_table_name self._static_chrom_info_path = app.config.len_file_path - self._static_dbkeys = odict() #need odict to keep ? at top of list + # A dbkey can be listed multiple times, but with different names, so we can't use dictionaries for lookups + self._static_dbkeys = [] if load_old_style: - for key, value in dbnames: - self._static_dbkeys[ key ] = value + self._static_dbkeys = list( dbnames ) def get_genome_build_names( self, trans=None ): # FIXME: how to deal with key duplicates? @@ -42,7 +41,7 @@ for key, chrom_dict in user_keys.iteritems(): rval.append( ( key, "%s (%s) [Custom]" % ( chrom_dict['name'], key ) ) ) # Load old builds.txt static keys - rval.extend( self._static_dbkeys.items() ) + rval.extend( self._static_dbkeys ) #load dbkeys from dbkey data table dbkey_table = self._app.tool_data_tables.get( self._data_table_name, None ) if dbkey_table is not None: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org