Don't try to use custom_plugins when folder doesn't exist

This commit is contained in:
Ruud
2013-09-29 13:44:52 +02:00
parent 333abd2486
commit e7aa91b3e1
+1
View File
@@ -32,6 +32,7 @@ class Loader(object):
# Add custom plugin folder # Add custom plugin folder
from couchpotato.environment import Env from couchpotato.environment import Env
custom_plugin_dir = os.path.join(Env.get('data_dir'), 'custom_plugins') custom_plugin_dir = os.path.join(Env.get('data_dir'), 'custom_plugins')
if os.path.isdir(custom_plugin_dir):
sys.path.insert(0, custom_plugin_dir) sys.path.insert(0, custom_plugin_dir)
self.paths['custom_plugins'] = (30, '', custom_plugin_dir) self.paths['custom_plugins'] = (30, '', custom_plugin_dir)