diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-03-09 21:51:56 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-03-09 21:51:56 +0000 |
commit | d59a484e32788b15bc7ee244a7b3e254ba016ab4 (patch) | |
tree | 51282eeebe4b5d32d00be8d6ed2c8ecf3d8f8c8f | |
parent | 5e494a8be31724d0b2f990f60337c83e545d4c1e (diff) | |
download | bcfg2-d59a484e32788b15bc7ee244a7b3e254ba016ab4.tar.gz bcfg2-d59a484e32788b15bc7ee244a7b3e254ba016ab4.tar.bz2 bcfg2-d59a484e32788b15bc7ee244a7b3e254ba016ab4.zip |
* Fix error message before logging is initialized
* Fix error message when new stats file is created
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1800 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Statistics.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Server/Statistics.py b/src/lib/Server/Statistics.py index 4a86cdf35..64d6433a2 100644 --- a/src/lib/Server/Statistics.py +++ b/src/lib/Server/Statistics.py @@ -15,8 +15,8 @@ class Statistics(object): self.element = Element('Dummy') self.dirty = 0 self.lastwrite = 0 - self.ReadFromFile() self.logger = logging.getLogger('Bcfg2.Server.Statistics') + self.ReadFromFile() def pretty_print(self, element, level=0): '''Produce a pretty-printed text representation of element''' @@ -55,7 +55,7 @@ class Statistics(object): self.dirty = 0 #syslog(LOG_INFO, "Statistics: Read in statistics.xml") except (IOError, XMLSyntaxError): - self.logger.error("Failed to parse %s"%(self.filename)) + self.logger.error("Creating new statistics file %s"%(self.filename)) self.element = Element('ConfigStatistics') self.WriteBack() self.dirty = 0 |