From ce54045b20996584f1b83a1966d4f526f3f4fdf2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 13 Dec 2014 23:04:00 -0500 Subject: [PATCH] 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. --- lib/galaxy/datatypes/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/registry.py b/lib/galaxy/datatypes/registry.py index fb81aefa3a2..83f52a5b916 100644 --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -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 )