ia64/xen-unstable

changeset 7076:9575efe88e75

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 <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Sep 27 15:03:00 2005 +0100 (2005-09-27)
parents a8ed2f186c23
children c9d690c52afc
files tools/python/xen/xend/PrettyPrint.py
line diff
     1.1 --- a/tools/python/xen/xend/PrettyPrint.py	Tue Sep 27 14:49:31 2005 +0100
     1.2 +++ b/tools/python/xen/xend/PrettyPrint.py	Tue Sep 27 15:03:00 2005 +0100
     1.3 @@ -52,7 +52,7 @@ class PrettyString(PrettyItem):
     1.4      def output(self, out):
     1.5          out.write(self.value)
     1.6  
     1.7 -    def prettyprint(self, line, _):
     1.8 +    def prettyprint(self, line):
     1.9          line.output(self)
    1.10  
    1.11      def show(self, out):
    1.12 @@ -63,7 +63,7 @@ class PrettySpace(PrettyItem):
    1.13      def output(self, out):
    1.14          out.write(' ' * self.width)
    1.15  
    1.16 -    def prettyprint(self, line, _):
    1.17 +    def prettyprint(self, line):
    1.18          line.output(self)
    1.19  
    1.20      def show(self, out):
    1.21 @@ -80,7 +80,7 @@ class PrettyBreak(PrettyItem):
    1.22      def output(self, out):
    1.23          out.write(' ' * self.width)
    1.24  
    1.25 -    def prettyprint(self, line, _):
    1.26 +    def prettyprint(self, line):
    1.27          if line.breaks(self.space):
    1.28              self.active = 1
    1.29              line.newline(self.indent)
    1.30 @@ -97,7 +97,7 @@ class PrettyNewline(PrettySpace):
    1.31          block.newline()
    1.32          block.addtoline(self)
    1.33  
    1.34 -    def prettyprint(self, line, _):
    1.35 +    def prettyprint(self, line):
    1.36          line.newline(0)
    1.37          line.output(self)
    1.38  
    1.39 @@ -127,7 +127,7 @@ class PrettyLine(PrettyItem):
    1.40              lastbreak.space = (width - lastwidth)
    1.41          self.width = width
    1.42   
    1.43 -    def prettyprint(self, line, _):
    1.44 +    def prettyprint(self, line):
    1.45          for x in self.content:
    1.46              x.prettyprint(line)
    1.47  
    1.48 @@ -168,7 +168,7 @@ class PrettyBlock(PrettyItem):
    1.49      def addtoline(self, x):
    1.50          self.lines[-1].write(x)
    1.51  
    1.52 -    def prettyprint(self, line, _):
    1.53 +    def prettyprint(self, line):
    1.54          self.indent = line.used
    1.55          line.block = self
    1.56          if not line.fits(self.width):
    1.57 @@ -252,7 +252,7 @@ class PrettyPrinter:
    1.58          self.block = self.block.parent
    1.59  
    1.60      def prettyprint(self, out=sys.stdout):
    1.61 -        self.top.prettyprint(Line(out, self.width), self.width)
    1.62 +        self.top.prettyprint(Line(out, self.width))
    1.63  
    1.64  class SXPPrettyPrinter(PrettyPrinter):
    1.65      """An SXP prettyprinter.