From 42e0eea6e7ed96c6a6d0405dcb2c7879139afeca Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 11 Feb 2013 15:46:08 +0200 Subject: [PATCH] Tidy up a little. --- openlp/core/lib/pluginmanager.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py index cdd99a9e0..aefb11fc1 100644 --- a/openlp/core/lib/pluginmanager.py +++ b/openlp/core/lib/pluginmanager.py @@ -72,16 +72,14 @@ class PluginManager(object): """ log.info(u'Finding plugins') start_depth = len(os.path.abspath(plugin_dir).split(os.sep)) + present_plugin_dir = os.path.join(plugin_dir, 'presentations') log.debug(u'finding plugins in %s at depth %d', unicode(plugin_dir), start_depth) for root, dirs, files in os.walk(plugin_dir): - # TODO Presentation plugin is not yet working on Mac OS X. - # For now just ignore it. The following code will hide it - # in settings dialog. - if sys.platform == 'darwin': - present_plugin_dir = os.path.join(plugin_dir, 'presentations') - # Ignore files from the presentation plugin directory. - if root.startswith(present_plugin_dir): - continue + if sys.platform == 'darwin'and root.startswith(present_plugin_dir): + # TODO Presentation plugin is not yet working on Mac OS X. + # For now just ignore it. The following code will ignore files from the presentation plugin directory + # and thereby never import the plugin. + continue for name in files: if name.endswith(u'.py') and not name.startswith(u'__'): path = os.path.abspath(os.path.join(root, name))