commit/galaxy-central: greg: Fix for loading proprietary datatype sniffers that are included in installed tool shed repositories.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/b4ba8b20d78d/ changeset: b4ba8b20d78d user: greg date: 2012-02-07 17:15:20 summary: Fix for loading proprietary datatype sniffers that are included in installed tool shed repositories. affected #: 1 file diff -r 271ccd09bc2367c7e20d59afb0a7307d4016a1f5 -r b4ba8b20d78d5ae92ebab85afeb6662ca602d427 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -187,11 +187,21 @@ try: fields = dtype.split( ":" ) datatype_module = fields[0] - datatype_class = fields[1] - module = __import__( datatype_module ) - for comp in datatype_module.split( '.' )[ 1: ]: - module = getattr( module, comp ) - aclass = getattr( module, datatype_class )() + datatype_class_name = fields[1] + module = None + if imported_modules: + # See if one of the imported modules contains the datatype class name. + for imported_module in imported_modules: + if hasattr( imported_module, datatype_class_name ): + module = imported_module + break + if module is None: + # The datatype class name must be contained in one of the datatype + # modules in the Galaxy distribution. + module = __import__( datatype_module ) + for comp in datatype_module.split( '.' )[ 1: ]: + module = getattr( module, comp ) + aclass = getattr( module, datatype_class_name )() if deactivate: self.sniff_order.remove( aclass ) self.log.debug( 'Deactivated sniffer for datatype: %s' % dtype ) 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