diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-02-10 13:55:01 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-02-10 13:55:01 +0000 |
commit | 64094271640e11ea6a074a1df7e9fdebde65fd79 (patch) | |
tree | d29d280aaf9b852f6eb21d8e27641f462e7e75aa /src | |
parent | 16b4e38d338cf9fb0c36ae32e193177405844677 (diff) | |
download | bcfg2-64094271640e11ea6a074a1df7e9fdebde65fd79.tar.gz bcfg2-64094271640e11ea6a074a1df7e9fdebde65fd79.tar.bz2 bcfg2-64094271640e11ea6a074a1df7e9fdebde65fd79.zip |
Minor statistics fixups (for tmpfile name change)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2799 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-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 3304bab40..269bf9e6a 100644 --- a/src/lib/Server/Statistics.py +++ b/src/lib/Server/Statistics.py @@ -26,13 +26,13 @@ class Statistics(object): try: fout = open(self.filename + '.new', 'w') except IOError, ioerr: - self.logger.error("Failed to open %s for writing: %s" % (self.filename, ioerr)) + self.logger.error("Failed to open %s for writing: %s" % (self.filename + '.new', ioerr)) else: fout.write(lxml.etree.tostring(self.element)) fout.close() + os.rename(self.filename + '.new', self.filename) self.dirty = 0 self.lastwrite = time() - os.rename(self.filename + '.new', self.filename) def ReadFromFile(self): '''Reads current state regarding statistics''' |