diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2010-06-04 16:42:49 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-06-04 11:46:29 -0500 |
commit | a34f4f46672a845813a90da9c81b18b01dad4918 (patch) | |
tree | 6cd311383420923b0d8727f804f95699206af633 /src/lib/Server | |
parent | e7746bf420f1d536cee9198a533383b8bb4edca3 (diff) | |
download | bcfg2-a34f4f46672a845813a90da9c81b18b01dad4918.tar.gz bcfg2-a34f4f46672a845813a90da9c81b18b01dad4918.tar.bz2 bcfg2-a34f4f46672a845813a90da9c81b18b01dad4918.zip |
Switch location to hostname. Urls break things.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5887 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-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()) |