centralize path list handling

move it to constants and avoid duplicating code or misinforming
developers on the nature of the data
This commit is contained in:
Brian Coca
2016-03-30 07:16:09 -07:00
parent 3f6166d2bf
commit 92d154f4ef
4 changed files with 20 additions and 18 deletions

View File

@@ -158,8 +158,7 @@ class PluginLoader:
# look in any configured plugin paths, allow one level deep for subcategories
if self.config is not None:
configured_paths = self.config.split(os.pathsep)
for path in configured_paths:
for path in self.config:
path = os.path.realpath(os.path.expanduser(path))
contents = glob.glob("%s/*" % path) + glob.glob("%s/*/*" % path)
for c in contents: