ia64/xen-unstable

changeset 4948:5b730cb3857a

bitkeeper revision 1.1426 (4289b3a59jCX-jlUcC5FbM5VwgzLvw)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk
date Tue May 17 09:04:37 2005 +0000 (2005-05-17)
parents 71c1f8cf361d 6556b9a0ffa4
children 386956408063 98d34d775063
files tools/python/xen/xend/PrettyPrint.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/PrettyPrint.py	Tue May 17 08:54:49 2005 +0000
     1.2 +++ b/tools/python/xen/xend/PrettyPrint.py	Tue May 17 09:04:37 2005 +0000
     1.3 @@ -285,6 +285,16 @@ def prettyprint(sxpr, out=sys.stdout, wi
     1.4          sxp.show(sxpr, out=out)
     1.5      print >> out
     1.6  
     1.7 +def prettyprintstring(sxp):
     1.8 +    class tmpstr:
     1.9 +        def __init__(self):
    1.10 +            self.str = ""
    1.11 +        def write(self, str):
    1.12 +            self.str = self.str + str
    1.13 +    tmp = tmpstr()
    1.14 +    prettyprint(sxp, out=tmp)
    1.15 +    return tmp.str
    1.16 +
    1.17  def main():
    1.18      pin = sxp.Parser()
    1.19      while 1:
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue May 17 08:54:49 2005 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue May 17 09:04:37 2005 +0000
     2.3 @@ -28,7 +28,7 @@ from XendLogging import log
     2.4  from XendError import VmError
     2.5  from XendRoot import get_component
     2.6  
     2.7 -from PrettyPrint import prettyprint
     2.8 +from PrettyPrint import prettyprintstring
     2.9  
    2.10  """Flag for a block device backend domain."""
    2.11  SIF_BLK_BE_DOMAIN = (1<<4)
    2.12 @@ -192,9 +192,8 @@ def vm_recreate(savedinfo, info):
    2.13      @param info:      domain info from xc
    2.14      @type  info:      xc domain dict
    2.15      """
    2.16 -    print 'vm_recreate>'
    2.17 -    print 'savedinfo=' ; prettyprint(savedinfo)
    2.18 -    print 'info=', info
    2.19 +    log.debug('savedinfo=' + prettyprintstring(savedinfo))
    2.20 +    log.debug('info=' + str(info))
    2.21      vm = XendDomainInfo()
    2.22      vm.recreate = True
    2.23      vm.savedinfo = savedinfo