From e7aa91b3e1f5cc28c5d678b7a7dfe6b038d44ea8 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 29 Sep 2013 13:44:52 +0200 Subject: [PATCH] Don't try to use custom_plugins when folder doesn't exist --- couchpotato/core/loader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/loader.py b/couchpotato/core/loader.py index 6ceee4e..c14b55b 100644 --- a/couchpotato/core/loader.py +++ b/couchpotato/core/loader.py @@ -32,8 +32,9 @@ class Loader(object): # Add custom plugin folder from couchpotato.environment import Env custom_plugin_dir = os.path.join(Env.get('data_dir'), 'custom_plugins') - sys.path.insert(0, custom_plugin_dir) - self.paths['custom_plugins'] = (30, '', custom_plugin_dir) + if os.path.isdir(custom_plugin_dir): + sys.path.insert(0, custom_plugin_dir) + self.paths['custom_plugins'] = (30, '', custom_plugin_dir) # Loop over all paths and add to module list for plugin_type, plugin_tuple in self.paths.iteritems():