commit/galaxy-central: natefoo: Merged in dan/galaxy-central-prs/stable (pull request #584)
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/caade2c602d6/ Changeset: caade2c602d6 Branch: stable User: natefoo Date: 2014-12-04 14:20:19+00:00 Summary: Merged in dan/galaxy-central-prs/stable (pull request #584) [STABLE] DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format). Affected #: 1 file diff -r cfdd5c45c63eee193cdefa7767e9b43217238e88 -r caade2c602d65a005d54997e95fcb1a9eab6ea17 lib/galaxy/tools/parameters/dataset_matcher.py --- a/lib/galaxy/tools/parameters/dataset_matcher.py +++ b/lib/galaxy/tools/parameters/dataset_matcher.py @@ -39,26 +39,30 @@ return state_valid and ( not check_security or self.__can_access_dataset( dataset ) ) def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ): - """ Return False of this parameter can not be matched to a the supplied + """ Return False of this parameter can not be matched to the supplied HDA, otherwise return a description of the match (either a HdaDirectMatch describing a direct match or a HdaImplicitMatch describing an implicit conversion.) """ + rval = False + formats = self.param.formats + if hda.datatype.matches_any( formats ): + rval = HdaDirectMatch( hda ) + else: + if not check_implicit_conversions: + return False + target_ext, converted_dataset = hda.find_conversion_destination( formats ) + if target_ext: + if converted_dataset: + hda = converted_dataset + if check_security and not self.__can_access_dataset( hda.dataset ): + return False + rval = HdaImplicitMatch( hda, target_ext ) + else: + return False if self.filter( hda ): return False - formats = self.param.formats - if hda.datatype.matches_any( formats ): - return HdaDirectMatch( hda ) - if not check_implicit_conversions: - return False - target_ext, converted_dataset = hda.find_conversion_destination( formats ) - if target_ext: - if converted_dataset: - hda = converted_dataset - if check_security and not self.__can_access_dataset( hda.dataset ): - return False - return HdaImplicitMatch( hda, target_ext ) - return False + return rval def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ): """ If HDA is accessible, return information about whether it could 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