diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-01 09:00:00 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-01 09:04:42 -0500 |
commit | b9c8a6c4c0245db0515a164f1b89247688e3b4fa (patch) | |
tree | 4565843b30bef6ede7a58cff2ebf209f37eabfdd /src/lib/Bcfg2/Server/Plugins | |
parent | eae8bbd6d211d711be4f414f108aa597b38891e0 (diff) | |
download | bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.tar.gz bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.tar.bz2 bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.zip |
DBStats: New db update routines
Replace updatefix.py with the Updater class. This streamlines some
of the common tasks and groups database updates by release. Upgrades
from pre 1.1.x are no longer supported.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/DBStats.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/DBStats.py b/src/lib/Bcfg2/Server/Plugins/DBStats.py index 131b6b059..b28484039 100644 --- a/src/lib/Bcfg2/Server/Plugins/DBStats.py +++ b/src/lib/Bcfg2/Server/Plugins/DBStats.py @@ -14,7 +14,7 @@ import Bcfg2.Server.Plugin import Bcfg2.Server.Reports.importscript from Bcfg2.Server.Reports.reports.models import Client import Bcfg2.Server.Reports.settings -from Bcfg2.Server.Reports.updatefix import update_database +from Bcfg2.Server.Reports.Updater import update_database, UpdaterError # for debugging output only logger = logging.getLogger('Bcfg2.Plugins.DBStats') @@ -34,6 +34,8 @@ class DBStats(Bcfg2.Server.Plugin.Plugin, "add to the statistics database") try: update_database() + except UpdaterError: + raise Bcfg2.Server.Plugin.PluginInitError except Exception: inst = sys.exc_info()[1] logger.debug(str(inst)) |