[XEND] Used shutil.rename to cope with /tmp and /var on different file systems

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Tom Wilkie committed 2007-04-27 11:03:47 +01:00
1 parent e65161ebc2
commit 2f53778243
1 file changed
+4 -2
+4 -2
View File
@@ -293,10 +293,12 @@ class XendDomain:
width = 78)
finally:
f.close()
try:
os.rename(fn, self._managed_config_path(dom_uuid))
shutil.move(fn, self._managed_config_path(dom_uuid))
except:
log.exception("Renaming %s" % fn)
log.exception("Renaming %s to %s", fn,
self._managed_config_path(dom_uuid))
os.remove(fn)
except:
log.exception("Error occurred saving configuration file " +
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.