mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix bug in registry.py requiring the odd relative import of locally defined data type modules.
So many times I helped people get stuff working by telling them to stick the import in this file without ever understanding why the import needed to be there, the answer would appear to be - because there was a bug. Kanwei Li fixed the same bug in the sniffer code in d7c529f. Fixing this bug should allow dynamically injecting datatypes (outside context of tool shed) without modifying Galaxy's source - important for OS packages and planemo.
This commit is contained in:
@@ -203,7 +203,7 @@ class Registry( object ):
|
||||
try:
|
||||
# The datatype class name must be contained in one of the datatype modules in the Galaxy distribution.
|
||||
fields = datatype_module.split( '.' )
|
||||
module = __import__( fields.pop( 0 ) )
|
||||
module = __import__( datatype_module )
|
||||
for mod in fields:
|
||||
module = getattr( module, mod )
|
||||
datatype_class = getattr( module, datatype_class_name )
|
||||
|
||||
Reference in New Issue
Block a user