From 1d50e91b27bd6bd8e39b15af482c6dfbfb3f4df7 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 16 Sep 2018 23:45:20 +0200 Subject: [PATCH] Removed unneeded lock acquire --- platypush/context/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platypush/context/__init__.py b/platypush/context/__init__.py index f64a73047..4f7ffccd0 100644 --- a/platypush/context/__init__.py +++ b/platypush/context/__init__.py @@ -74,9 +74,8 @@ def get_plugin(plugin_name, reload=False): if plugin_name not in plugins_init_locks: plugins_init_locks[plugin_name] = Lock() - with plugins_init_locks[plugin_name]: - if plugin_name in plugins and not reload: - return plugins[plugin_name] + if plugin_name in plugins and not reload: + return plugins[plugin_name] try: plugin = importlib.import_module('platypush.plugins.' + plugin_name)