Commit 3908d50b by Michael DeHaan

Tolerate no module search path.

parent 1b7f7aa5
...@@ -126,15 +126,16 @@ class PluginLoader(object): ...@@ -126,15 +126,16 @@ class PluginLoader(object):
ret.append(fullpath) ret.append(fullpath)
# look in any configured plugin paths, allow one level deep for subcategories # look in any configured plugin paths, allow one level deep for subcategories
configured_paths = self.config.split(os.pathsep) if self.config is not None:
for path in configured_paths: configured_paths = self.config.split(os.pathsep)
path = os.path.realpath(os.path.expanduser(path)) for path in configured_paths:
contents = glob.glob("%s/*" % path) path = os.path.realpath(os.path.expanduser(path))
for c in contents: contents = glob.glob("%s/*" % path)
if os.path.isdir(c) and c not in ret: for c in contents:
ret.append(c) if os.path.isdir(c) and c not in ret:
if path not in ret: ret.append(c)
ret.append(path) if path not in ret:
ret.append(path)
# look for any plugins installed in the package subtree # look for any plugins installed in the package subtree
ret.extend(self._get_package_paths()) ret.extend(self._get_package_paths())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment