diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:32:04 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:41:53 -0400 |
commit | 7e43d4af98a12e5685f250bf2161fc7afebe02a1 (patch) | |
tree | c01973d3dcf075b394c7dec66a1a45894d8c9f4d /src/lib/Bcfg2/Reporting/Transport/base.py | |
parent | 4261f7238e3b7eb169fcb0f672e7fdb86d722189 (diff) | |
download | bcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.tar.gz bcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.tar.bz2 bcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.zip |
Options: migrated reporting to new parser
Diffstat (limited to 'src/lib/Bcfg2/Reporting/Transport/base.py')
-rw-r--r-- | src/lib/Bcfg2/Reporting/Transport/base.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Reporting/Transport/base.py b/src/lib/Bcfg2/Reporting/Transport/base.py index 530011e47..9fbf8c9d5 100644 --- a/src/lib/Bcfg2/Reporting/Transport/base.py +++ b/src/lib/Bcfg2/Reporting/Transport/base.py @@ -4,7 +4,7 @@ The base for all server -> collector Transports import os import sys -from Bcfg2.Server.Plugin import Debuggable +from Bcfg2.Logger import Debuggable class TransportError(Exception): @@ -12,20 +12,18 @@ class TransportError(Exception): pass -class TransportImportError(TransportError): - """Raised when a transport fails to import""" - pass - - class TransportBase(Debuggable): """The base for all transports""" - def __init__(self, setup): + options = Debuggable.options + + def __init__(self): """Do something here""" clsname = self.__class__.__name__ Debuggable.__init__(self, name=clsname) self.debug_log("Loading %s transport" % clsname) - self.data = os.path.join(setup['repo'], 'Reporting', clsname) + self.data = os.path.join(Bcfg2.Options.setup.repository, 'Reporting', + clsname) if not os.path.exists(self.data): self.logger.info("%s does not exist, creating" % self.data) try: @@ -34,7 +32,6 @@ class TransportBase(Debuggable): self.logger.warning("Could not create %s: %s" % (self.data, sys.exc_info()[1])) self.logger.warning("The transport may not function properly") - self.setup = setup self.timeout = 2 def start_monitor(self, collector): |