From 86c2d4c6aa9dbc4fe4fbba53ec55359505a00798 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 13 Dec 2014 23:04:00 -0500 Subject: [PATCH] Remove another incorrect lock statement. --- lib/galaxy/datatypes/registry.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/datatypes/registry.py b/lib/galaxy/datatypes/registry.py index c9375451a97..fb81aefa3a2 100644 --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -184,9 +184,8 @@ class Registry( object ): if ok: datatype_class = None if proprietary_path and proprietary_datatype_module and datatype_class_name: - # We need to change the value of sys.path, so do it in a way that is thread-safe. - lock = threading.Lock() - lock.acquire( True ) + # TODO: previously comments suggested this needs to be locked because it modifys + # the sys.path, probably true but the previous lock wasn't doing that. try: imported_module = __import_module( proprietary_path, proprietary_datatype_module, @@ -198,8 +197,6 @@ class Registry( object ): except Exception, e: full_path = os.path.join( proprietary_path, proprietary_datatype_module ) self.log.debug( "Exception importing proprietary code file %s: %s" % ( str( full_path ), str( e ) ) ) - finally: - lock.release() # Either the above exception was thrown because the proprietary_datatype_module is not derived from a class # in the repository, or we are loading Galaxy's datatypes. In either case we'll look in the registry. if datatype_class is None: