diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-12-02 17:21:12 +0000 |
---|---|---|
committer | Your Name <you@example.com> | 2016-06-28 20:19:33 +0000 |
commit | 1f0c8156017ce950295240bde3c0d10dd236a1a8 (patch) | |
tree | ce2a59c10c46c12cc7c9ad94b63ef32fbd0e755a | |
parent | 7ef12b758020176fb3e13e5bb0154084b1456797 (diff) | |
download | turbo-hipster-1f0c8156017ce950295240bde3c0d10dd236a1a8.tar.gz |
Allow plugins to be imported from places other than task_plugins
-rw-r--r-- | turbo_hipster/worker_server.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/turbo_hipster/worker_server.py b/turbo_hipster/worker_server.py index 5a2ff00..c59c2ef 100644 --- a/turbo_hipster/worker_server.py +++ b/turbo_hipster/worker_server.py @@ -118,6 +118,8 @@ class Server(threading.Thread): if 'plugins' in self.config: for plugin in self.config['plugins']: try: + if plugin['pythonpath'] not in sys.path: + sys.path.append(plugin['pythonpath']) module = __import__('turbo_hipster.task_plugins.' + plugin['name'] + '.task', fromlist='turbo_hipster.task_plugins' + |