ia64/xen-unstable
changeset 4947:6556b9a0ffa4
bitkeeper revision 1.1421.1.1 (4289b3a0n7JmXiz6fiz0QAfqJ_M1Lg)
XendDomainInfo.py:
Redirect debug output to log.
PrettyPrint.py:
Add prettyprintstring.
XendDomainInfo.py:
Remove debug print.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
XendDomainInfo.py:
Redirect debug output to log.
PrettyPrint.py:
Add prettyprintstring.
XendDomainInfo.py:
Remove debug print.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Tue May 17 09:04:32 2005 +0000 (2005-05-17) |
parents | f849286c8a79 |
children | 5b730cb3857a |
files | tools/python/xen/xend/PrettyPrint.py tools/python/xen/xend/XendDomainInfo.py |
line diff
1.1 --- a/tools/python/xen/xend/PrettyPrint.py Mon May 16 16:46:06 2005 +0000 1.2 +++ b/tools/python/xen/xend/PrettyPrint.py Tue May 17 09:04:32 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 Mon May 16 16:46:06 2005 +0000 2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue May 17 09:04:32 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