diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2010-01-24 00:12:22 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-01-24 00:12:22 +0000 |
commit | e3bd887d601dad1be9352768206cbb45a91a8cc7 (patch) | |
tree | 829ba3f6a2b715f3d0a13ebb272a775987f79bc5 | |
parent | c54cf38556731fbd7f7b5dbe8f02a8f994637932 (diff) | |
download | bcfg2-e3bd887d601dad1be9352768206cbb45a91a8cc7.tar.gz bcfg2-e3bd887d601dad1be9352768206cbb45a91a8cc7.tar.bz2 bcfg2-e3bd887d601dad1be9352768206cbb45a91a8cc7.zip |
Fix call to os.rename()
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5702 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index c610cc955..e7dd90f00 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -500,7 +500,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, self.logger.error("Metadata: Failed to write new clients data to clients.xml.new", exc_info=1) os.unlink("%s/%s" % (self.data, "clients.xml.new")) raise MetadataRuntimeError - datafile.close() + datafile.close() # check if clients.xml is a symlink clientsxml = "%s/%s" % (self.data, 'clients.xml') @@ -508,8 +508,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin, clientsxml = os.readlink(clientsxml) try: - os.rename("%s/%s" % (self.data, 'clients.xml.new'), - "%s/%s" % (clientsxml)) + os.rename("%s/%s" % (self.data, 'clients.xml.new'), clientsxml) except: self.logger.error("Metadata: Failed to rename clients.xml.new") raise MetadataRuntimeError |