mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[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:
1 parent
e65161ebc2
commit
2f53778243
1 file changed
+4
-2
@@ -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 " +
|
||||
|
||||