Skip hidden directories, and the po and locale system dirs of gramps-addons

svn: r13485
This commit is contained in:
Doug Blank 2009-11-03 01:56:27 +00:00
parent 822586d8a5
commit e83e5effc5

View File

@ -107,9 +107,9 @@ class BasePluginManager(object):
return False # return value is True for error
for (dirpath, dirnames, filenames) in os.walk(direct, followlinks=True):
# Skip hidden directories.
for dirname in dirnames:
if dirname.startswith("."):
# Skip hidden and system directories:
if dirname.startswith(".") or dirname in ["po", "locale"]:
dirnames.remove(dirname)
# add the directory to the python search path
sys.path.append(dirpath)