1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c58f82badc26/ changeset: c58f82badc26 user: dan date: 2013-02-14 21:20:38 summary: Enhance TabularToolDataTable.get_entry() affected #: 1 file diff -r caaf60ca4511b532b58ec5e1de85e39a0067ae0d -r c58f82badc26168885507312b71ac2351046bee8 lib/galaxy/tools/data/__init__.py --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -280,23 +280,22 @@ rval.append( None ) return rval - def get_entry( self, query_attr, query_val, return_attr ): + def get_entry( self, query_attr, query_val, return_attr, default=None ): """ Returns table entry associated with a col/val pair. """ query_col = self.columns.get( query_attr, None ) - if not query_col: - return None + if query_col is None: + return default return_col = self.columns.get( return_attr, None ) - if not return_col: - return None - rval = None + if return_col is None: + return default + rval = default # Look for table entry. for fields in self.data: if fields[ query_col ] == query_val: rval = fields[ return_col ] break - return rval # Registry of tool data types by type_key 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.