diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 144ee16ca6..00c2603987 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -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 " +