forked from openlp/openlp
Tidy up a little.
This commit is contained in:
parent
f822aed40f
commit
42e0eea6e7
@ -72,16 +72,14 @@ class PluginManager(object):
|
|||||||
"""
|
"""
|
||||||
log.info(u'Finding plugins')
|
log.info(u'Finding plugins')
|
||||||
start_depth = len(os.path.abspath(plugin_dir).split(os.sep))
|
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)
|
log.debug(u'finding plugins in %s at depth %d', unicode(plugin_dir), start_depth)
|
||||||
for root, dirs, files in os.walk(plugin_dir):
|
for root, dirs, files in os.walk(plugin_dir):
|
||||||
# TODO Presentation plugin is not yet working on Mac OS X.
|
if sys.platform == 'darwin'and root.startswith(present_plugin_dir):
|
||||||
# For now just ignore it. The following code will hide it
|
# TODO Presentation plugin is not yet working on Mac OS X.
|
||||||
# in settings dialog.
|
# For now just ignore it. The following code will ignore files from the presentation plugin directory
|
||||||
if sys.platform == 'darwin':
|
# and thereby never import the plugin.
|
||||||
present_plugin_dir = os.path.join(plugin_dir, 'presentations')
|
continue
|
||||||
# Ignore files from the presentation plugin directory.
|
|
||||||
if root.startswith(present_plugin_dir):
|
|
||||||
continue
|
|
||||||
for name in files:
|
for name in files:
|
||||||
if name.endswith(u'.py') and not name.startswith(u'__'):
|
if name.endswith(u'.py') and not name.startswith(u'__'):
|
||||||
path = os.path.abspath(os.path.join(root, name))
|
path = os.path.abspath(os.path.join(root, name))
|
||||||
|
Loading…
Reference in New Issue
Block a user