ia64/xen-unstable

changeset 14967:6049b33d10e1

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

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Fri Apr 27 11:03:47 2007 +0100 (2007-04-27)
parents e7704d9b4a48
children 55d7745bd377
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Fri Apr 27 11:02:47 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Fri Apr 27 11:03:47 2007 +0100
     1.3 @@ -293,10 +293,12 @@ class XendDomain:
     1.4                                  width = 78)
     1.5                  finally:
     1.6                      f.close()
     1.7 +                    
     1.8                  try:
     1.9 -                    os.rename(fn, self._managed_config_path(dom_uuid))
    1.10 +                    shutil.move(fn, self._managed_config_path(dom_uuid))
    1.11                  except:
    1.12 -                    log.exception("Renaming %s" % fn)
    1.13 +                    log.exception("Renaming %s to %s", fn,
    1.14 +                                  self._managed_config_path(dom_uuid))
    1.15                      os.remove(fn)
    1.16              except:
    1.17                  log.exception("Error occurred saving configuration file " +