From b9c8a6c4c0245db0515a164f1b89247688e3b4fa Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Fri, 1 Jun 2012 09:00:00 -0500 Subject: 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. --- src/lib/Bcfg2/Server/Plugins/DBStats.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/Bcfg2/Server/Plugins') 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)) -- cgit v1.2.3-1-g7c22