Skip hidden directories when registering plugins.

svn: r13429
This commit is contained in:
Brian Matherly 2009-10-27 01:44:46 +00:00
parent bb99cd20b1
commit fa10edbfd1

View File

@ -107,6 +107,10 @@ class BasePluginManager(object):
return False # return value is True for error
for (dirpath, dirnames, filenames) in os.walk(direct):
# Skip hidden directories.
for dirname in dirnames:
if dirname.startswith("."):
dirnames.remove(dirname)
# add the directory to the python search path
sys.path.append(dirpath)
# if the path has not already been loaded, save it in the