diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-05-30 17:30:17 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-05-30 17:30:17 +0200 |
commit | 9325523cd0a2213460975d7d7169dc475ce70df3 (patch) | |
tree | c8b81877f39c7699503baf1cba75f38491e2dcfd /pyfirstaidkit | |
parent | 95104a7cc264e21d8fc77bdc9fc9748e1b8abc98 (diff) | |
download | firstaidkit-9325523cd0a2213460975d7d7169dc475ce70df3.tar.gz firstaidkit-9325523cd0a2213460975d7d7169dc475ce70df3.tar.xz firstaidkit-9325523cd0a2213460975d7d7169dc475ce70df3.zip |
When looking in paths given by the user, check to see if the paths is valid.
We don't want to fail as other paths might be usefull.
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r-- | pyfirstaidkit/plugins.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py index 849a82a..ecf1444 100644 --- a/pyfirstaidkit/plugins.py +++ b/pyfirstaidkit/plugins.py @@ -441,6 +441,9 @@ class PluginSystem(object): self._plugins = {} for path in self._paths: + if not os.path.isdir(path): + self._reporting.debug("The path %s does not exist" % path, level = PLUGINSYSTEM, origin = self) + continue #create list of potential modules in the path importlist = set() for f in os.listdir(path): |