From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Smith Subject: [PATCH] Fix 'xm list -l' Date: Mon, 26 Sep 2005 15:01:12 -0700 Message-ID: <87vf0n32vr.fsf@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Developers List-Id: xen-devel@lists.xenproject.org --=-=-= This patch cleans up some of the argument usage in PrettyPrint.py to avoid a stack trace when doing an 'xm list -l'. Most of the prettyprint() methods were called with 1 argument, but the functions required 2 (one of which was unused). Signed-off-by: Dan Smith --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fix_pp.patch diff -r 5ea81e640509 tools/python/xen/xend/PrettyPrint.py --- a/tools/python/xen/xend/PrettyPrint.py Sun Sep 25 10:47:22 2005 +++ b/tools/python/xen/xend/PrettyPrint.py Mon Sep 26 11:35:27 2005 @@ -52,7 +52,7 @@ def output(self, out): out.write(self.value) - def prettyprint(self, line, _): + def prettyprint(self, line): line.output(self) def show(self, out): @@ -63,7 +63,7 @@ def output(self, out): out.write(' ' * self.width) - def prettyprint(self, line, _): + def prettyprint(self, line): line.output(self) def show(self, out): @@ -80,7 +80,7 @@ def output(self, out): out.write(' ' * self.width) - def prettyprint(self, line, _): + def prettyprint(self, line): if line.breaks(self.space): self.active = 1 line.newline(self.indent) @@ -97,7 +97,7 @@ block.newline() block.addtoline(self) - def prettyprint(self, line, _): + def prettyprint(self, line): line.newline(0) line.output(self) @@ -127,7 +127,7 @@ lastbreak.space = (width - lastwidth) self.width = width - def prettyprint(self, line, _): + def prettyprint(self, line): for x in self.content: x.prettyprint(line) @@ -168,7 +168,7 @@ def addtoline(self, x): self.lines[-1].write(x) - def prettyprint(self, line, _): + def prettyprint(self, line): self.indent = line.used line.block = self if not line.fits(self.width): @@ -252,7 +252,7 @@ self.block = self.block.parent def prettyprint(self, out=sys.stdout): - self.top.prettyprint(Line(out, self.width), self.width) + self.top.prettyprint(Line(out, self.width)) class SXPPrettyPrinter(PrettyPrinter): """An SXP prettyprinter. --=-=-= -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-=-=--