diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/lib/Server/Admin/Reports.py | 7 | ||||
-rwxr-xr-x | src/lib/Server/Reports/importscript.py | 8 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/Server/Admin/Reports.py b/src/lib/Server/Admin/Reports.py index e4cbae8e1..e712ae77d 100755 --- a/src/lib/Server/Admin/Reports.py +++ b/src/lib/Server/Admin/Reports.py @@ -5,6 +5,7 @@ import ConfigParser import os import logging import pickle +import platform import sys from Bcfg2.Server.Reports.importscript import load_stats from Bcfg2.Server.Reports.updatefix import update_database @@ -181,9 +182,5 @@ class Reports(Bcfg2.Server.Admin.Mode): except (IOError, XMLSyntaxError): self.errExit("StatReports: Failed to parse %s"%(clientspath)) - try: - location = self.cfp.get('components', 'bcfg2') - except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): - self.errExit("Could not read bcfg2 from bcfg2.conf; exiting") - load_stats(clientsdata, statsdata, verb, self.log, quick=quick, location=location) + load_stats(clientsdata, statsdata, verb, self.log, quick=quick, location=platform.node()) diff --git a/src/lib/Server/Reports/importscript.py b/src/lib/Server/Reports/importscript.py index cc71837ea..69147abbb 100755 --- a/src/lib/Server/Reports/importscript.py +++ b/src/lib/Server/Reports/importscript.py @@ -28,6 +28,7 @@ import ConfigParser import difflib import logging import Bcfg2.Logger +import platform def build_reason_kwargs(r_ent): if r_ent.get('current_bfile', False): @@ -301,11 +302,6 @@ if __name__ == '__main__': raise SystemExit, 1 q = '-O3' in sys.argv - try: - location = cf.get('components', 'bcfg2') - except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): - print "Could not read bcfg2 from bcfg2.conf; exiting" - raise SystemExit, 1 # Be sure the database is ready for new schema update_database() - load_stats(clientsdata, statsdata, verb, logger, quick=q, location=location) + load_stats(clientsdata, statsdata, verb, logger, quick=q, location=platform.node()) |