commit/galaxy-central: dan: Add get() method to ToolDataTableManager.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/feb05b2ef24c/ changeset: feb05b2ef24c user: dan date: 2013-02-07 19:16:41 summary: Add get() method to ToolDataTableManager. affected #: 1 file diff -r bc309f6d4ce5e18c9d2c8eac6a50eeac06664554 -r feb05b2ef24c665e9245e554af40104a812f03a9 lib/galaxy/tools/data/__init__.py --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -28,6 +28,11 @@ return self.data_tables.__getitem__( key ) def __contains__( self, key ): return self.data_tables.__contains__( key ) + def get( self, name, default=None ): + try: + return self[ name ] + except KeyError: + return default def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ): """ This method is called under 3 conditions: 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)
-
Bitbucket