WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] XendDomainInfo.py:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] XendDomainInfo.py:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 17 May 2005 09:04:32 +0000
Delivery-date: Tue, 17 May 2005 11:03:02 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1421.1.1, 2005/05/17 10:04:32+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        XendDomainInfo.py:
          Redirect debug output to log.
        PrettyPrint.py:
          Add prettyprintstring.
        XendDomainInfo.py:
          Remove debug print.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 PrettyPrint.py    |   10 ++++++++++
 XendDomainInfo.py |    7 +++----
 2 files changed, 13 insertions(+), 4 deletions(-)


diff -Nru a/tools/python/xen/xend/PrettyPrint.py 
b/tools/python/xen/xend/PrettyPrint.py
--- a/tools/python/xen/xend/PrettyPrint.py      2005-05-17 07:03:40 -04:00
+++ b/tools/python/xen/xend/PrettyPrint.py      2005-05-17 07:03:40 -04:00
@@ -285,6 +285,16 @@
         sxp.show(sxpr, out=out)
     print >> out
 
+def prettyprintstring(sxp):
+    class tmpstr:
+        def __init__(self):
+            self.str = ""
+        def write(self, str):
+            self.str = self.str + str
+    tmp = tmpstr()
+    prettyprint(sxp, out=tmp)
+    return tmp.str
+
 def main():
     pin = sxp.Parser()
     while 1:
diff -Nru a/tools/python/xen/xend/XendDomainInfo.py 
b/tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   2005-05-17 07:03:40 -04:00
+++ b/tools/python/xen/xend/XendDomainInfo.py   2005-05-17 07:03:40 -04:00
@@ -28,7 +28,7 @@
 from XendError import VmError
 from XendRoot import get_component
 
-from PrettyPrint import prettyprint
+from PrettyPrint import prettyprintstring
 
 """Flag for a block device backend domain."""
 SIF_BLK_BE_DOMAIN = (1<<4)
@@ -192,9 +192,8 @@
     @param info:      domain info from xc
     @type  info:      xc domain dict
     """
-    print 'vm_recreate>'
-    print 'savedinfo=' ; prettyprint(savedinfo)
-    print 'info=', info
+    log.debug('savedinfo=' + prettyprintstring(savedinfo))
+    log.debug('info=' + str(info))
     vm = XendDomainInfo()
     vm.recreate = True
     vm.savedinfo = savedinfo

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>