summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/__init__.py35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py
index 59f66612d..1216fb60a 100644
--- a/src/lib/Client/Tools/__init__.py
+++ b/src/lib/Client/Tools/__init__.py
@@ -1,30 +1,4 @@
"""This contains all Bcfg2 Tool modules"""
-__revision__ = '$Revision$'
-
-__all__ = ["Action",
- "APT",
- "Blast",
- "Chkconfig",
- "DebInit",
- "Encap",
- "IPS",
- "FreeBSDInit",
- "FreeBSDPackage",
- "launchd",
- "MacPorts",
- "Portage",
- "POSIX",
- "RPMng",
- "rpmtools",
- "RcUpdate",
- "SMF",
- "SYSV",
- "Upstart",
- "YUMng"]
-
-drivers = [item for item in __all__ if item not in ['rpmtools']]
-default = [item for item in drivers if item not in ['RPM', 'Yum']]
-
# suppress popen2 warnings for python 2.3
import warnings
warnings.filterwarnings("ignore", "The popen2 module is deprecated.*",
@@ -36,6 +10,15 @@ import sys
import time
import Bcfg2.Client.XML
+__revision__ = '$Revision$'
+
+__all__ = [tool.split('.')[0] \
+ for tool in os.listdir(os.path.dirname(__file__)) \
+ if tool.endswith(".py") and tool != "__init__.py"]
+
+drivers = [item for item in __all__ if item not in ['rpmtools']]
+default = [item for item in drivers if item not in ['RPM', 'Yum']]
+
class toolInstantiationError(Exception):
"""This error is called if the toolset cannot be instantiated."""