Tidy up a little.

This commit is contained in:
Raoul Snyman 2013-02-11 15:46:08 +02:00
parent f822aed40f
commit 42e0eea6e7
1 changed files with 6 additions and 8 deletions

View File

@ -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))