diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-02-20 12:39:55 +0100 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-02-20 12:39:55 +0100 |
commit | 92cd3738523c90ff1464e0f3de9d064d0ac3132e (patch) | |
tree | 088ca107919d2f3e89a4f0b752124fa512148c35 /pyfirstaidkit/configuration.py | |
parent | 49b035b122874fc9038464d220caeef586d9574c (diff) | |
download | firstaidkit-92cd3738523c90ff1464e0f3de9d064d0ac3132e.tar.gz firstaidkit-92cd3738523c90ff1464e0f3de9d064d0ac3132e.tar.xz firstaidkit-92cd3738523c90ff1464e0f3de9d064d0ac3132e.zip |
Allow for a better detection of the whereabouts of the plugins. This is only for the default.
Diffstat (limited to 'pyfirstaidkit/configuration.py')
-rw-r--r-- | pyfirstaidkit/configuration.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pyfirstaidkit/configuration.py b/pyfirstaidkit/configuration.py index 285ef81..2ee94b4 100644 --- a/pyfirstaidkit/configuration.py +++ b/pyfirstaidkit/configuration.py @@ -37,15 +37,18 @@ def createDefaultConfig(config): config.operation.gui = "console" config.log.method = "file" config.log.filename = "/var/log/firstaidkit.log" + config.plugin.disabled = "" # - # Look for the place where the plugins lie. + # Look for the place where the plugins lie. Its going to be a coma separated list # - if os.path.exists("/usr/lib64"): libdir="lib64" - elif os.path.exists("/usr/lib"): libdir="lib" - else: raise - config.plugin.path = "/usr/%s/firstaidkit-plugins" % libdir - config.plugin.disabled = "" + config.plugin.paths = "" + for root in [ "usr/lib64", "usr/lib"]: + for dir in ["firstaidkit-plugins", "firstaidkit-plugins/examples"] + if os.path.exists( "/%s/%s", (root,dir)): + config.plugin.paths = config.plugins.paths+",/%s/%s",(root,dir) + config.plugin.paths = config.plugin.paths.strip(',') + class LockedError(Exception): pass |