debuggers.hg

changeset 19975:e845326ae203

python: Remove tab indents.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jul 14 14:43:19 2009 +0100 (2009-07-14)
parents 4afd6669a351
children 98e606e9d173
files tools/python/xen/web/SrvBase.py tools/python/xen/web/SrvDir.py tools/python/xen/xend/PrettyPrint.py tools/python/xen/xend/XendConfig.py tools/python/xen/xend/encode.py tools/python/xen/xend/osdep.py tools/python/xen/xend/server/pciquirk.py tools/python/xen/xend/sxp.py tools/python/xen/xm/create.py tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/web/SrvBase.py	Tue Jul 14 14:38:56 2009 +0100
     1.2 +++ b/tools/python/xen/web/SrvBase.py	Tue Jul 14 14:43:19 2009 +0100
     1.3 @@ -30,7 +30,7 @@ import httpserver
     1.4  
     1.5  def uri_pathlist(p):
     1.6      """Split a path into a list.
     1.7 -    p		path
     1.8 +    p path
     1.9      return list of path elements
    1.10      """
    1.11      l = []
    1.12 @@ -51,7 +51,7 @@ class SrvBase(resource.Resource):
    1.13          """Get the method for an operation.
    1.14          For operation 'foo' looks for 'op_foo'.
    1.15  
    1.16 -        op	operation name
    1.17 +        op operation name
    1.18          returns method or None
    1.19          """
    1.20          op_method_name = 'op_' + op
    1.21 @@ -67,7 +67,7 @@ class SrvBase(resource.Resource):
    1.22          and an HTML string otherwise (or list).
    1.23          Methods may also return a ThreadRequest (for incomplete processing).
    1.24  
    1.25 -        req	request
    1.26 +        req request
    1.27          """
    1.28          op = req.args.get('op')
    1.29          if op is None or len(op) != 1:
     2.1 --- a/tools/python/xen/web/SrvDir.py	Tue Jul 14 14:38:56 2009 +0100
     2.2 +++ b/tools/python/xen/web/SrvDir.py	Tue Jul 14 14:43:19 2009 +0100
     2.3 @@ -37,7 +37,7 @@ class SrvConstructor:
     2.4          """Create a constructor. It is assumed that the class
     2.5          should be imported as 'from xen.xend.server.klass import klass'.
     2.6  
     2.7 -        klass	name of its class
     2.8 +        klass name of its class
     2.9          """
    2.10          self.klass = klass
    2.11          self.obj = None
     3.1 --- a/tools/python/xen/xend/PrettyPrint.py	Tue Jul 14 14:38:56 2009 +0100
     3.2 +++ b/tools/python/xen/xend/PrettyPrint.py	Tue Jul 14 14:43:19 2009 +0100
     3.3 @@ -284,9 +284,9 @@ class SXPPrettyPrinter(PrettyPrinter):
     3.4  def prettyprint(sxpr, out=sys.stdout, width=80):
     3.5      """Prettyprint an SXP form.
     3.6  
     3.7 -    sxpr	s-expression
     3.8 -    out		destination
     3.9 -    width	maximum output width
    3.10 +    sxpr  s-expression
    3.11 +    out   destination
    3.12 +    width maximum output width
    3.13      """
    3.14      if isinstance(sxpr, types.ListType):
    3.15          pp = SXPPrettyPrinter(width=width)
    3.16 @@ -299,8 +299,8 @@ def prettyprint(sxpr, out=sys.stdout, wi
    3.17  def prettyprintstring(sxpr, width=80):
    3.18      """Prettyprint an SXP form to a string.
    3.19  
    3.20 -    sxpr	s-expression
    3.21 -    width	maximum output width
    3.22 +    sxpr  s-expression
    3.23 +    width maximum output width
    3.24      """
    3.25      io = StringIO.StringIO()
    3.26      prettyprint(sxpr, out=io, width=width)
     4.1 --- a/tools/python/xen/xend/XendConfig.py	Tue Jul 14 14:38:56 2009 +0100
     4.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Jul 14 14:43:19 2009 +0100
     4.3 @@ -1437,20 +1437,20 @@ class XendConfig(dict):
     4.4                  if dev_uuid not in target['console_refs']:
     4.5                      target['console_refs'].append(dev_uuid)
     4.6  
     4.7 -		# Cope with old-format save files which say under vfb
     4.8 -		# (type vfb) rather than (vfb 1)
     4.9 -		try:
    4.10 -		    vfb_type = dev_info['type']
    4.11 -		except KeyError:
    4.12 -		    vfb_type = None
    4.13 -		log.debug("iwj dev_type=%s vfb type %s" %
    4.14 -			(dev_type, `vfb_type`))
    4.15 +                # Cope with old-format save files which say under vfb
    4.16 +                # (type vfb) rather than (vfb 1)
    4.17 +                try:
    4.18 +                    vfb_type = dev_info['type']
    4.19 +                except KeyError:
    4.20 +                    vfb_type = None
    4.21 +                log.debug("iwj dev_type=%s vfb type %s" %
    4.22 +                          (dev_type, `vfb_type`))
    4.23  
    4.24 -		if vfb_type == 'vnc' or vfb_type == 'sdl':
    4.25 -		    dev_info[vfb_type] = 1
    4.26 -		    del dev_info['type']
    4.27 -		    log.debug("iwj dev_type=%s vfb setting dev_info['%s']" %
    4.28 -				(dev_type, vfb_type))
    4.29 +                if vfb_type == 'vnc' or vfb_type == 'sdl':
    4.30 +                    dev_info[vfb_type] = 1
    4.31 +                    del dev_info['type']
    4.32 +                    log.debug("iwj dev_type=%s vfb setting dev_info['%s']" %
    4.33 +                              (dev_type, vfb_type))
    4.34                  # Create serial backends now, the location value is bogus, but does not matter
    4.35                  i=0
    4.36                  chardev=0
     5.1 --- a/tools/python/xen/xend/encode.py	Tue Jul 14 14:38:56 2009 +0100
     5.2 +++ b/tools/python/xen/xend/encode.py	Tue Jul 14 14:43:19 2009 +0100
     5.3 @@ -97,7 +97,7 @@ def encode_data(d):
     5.4      """Encode some data for HTTP transport.
     5.5      The encoding used is stored in 'Content-Type' in the headers.
     5.6  
     5.7 -    d	data - sequence of tuples or dictionary
     5.8 +    d data - sequence of tuples or dictionary
     5.9      returns a 2-tuple of the headers and the encoded data
    5.10      """
    5.11      val = ({}, None)
     6.1 --- a/tools/python/xen/xend/osdep.py	Tue Jul 14 14:38:56 2009 +0100
     6.2 +++ b/tools/python/xen/xend/osdep.py	Tue Jul 14 14:43:19 2009 +0100
     6.3 @@ -72,12 +72,11 @@ def _linux_balloon_stat_sysfs(label):
     6.4      return None
     6.5  
     6.6  def _linux_balloon_stat(label):
     6.7 -	if os.access(PROC_XEN_BALLOON, os.F_OK):
     6.8 -		return _linux_balloon_stat_proc(label)
     6.9 -	elif os.access(SYSFS_XEN_MEMORY, os.F_OK):
    6.10 -		return _linux_balloon_stat_sysfs(label)
    6.11 -
    6.12 -	return None
    6.13 +    if os.access(PROC_XEN_BALLOON, os.F_OK):
    6.14 +        return _linux_balloon_stat_proc(label)
    6.15 +    elif os.access(SYSFS_XEN_MEMORY, os.F_OK):
    6.16 +        return _linux_balloon_stat_sysfs(label)
    6.17 +    return None
    6.18  
    6.19  def _solaris_balloon_stat(label):
    6.20      """Returns the value for the named label, or None if an error occurs."""
     7.1 --- a/tools/python/xen/xend/server/pciquirk.py	Tue Jul 14 14:38:56 2009 +0100
     7.2 +++ b/tools/python/xen/xend/server/pciquirk.py	Tue Jul 14 14:43:19 2009 +0100
     7.3 @@ -37,10 +37,10 @@ class PCIQuirk:
     7.4              if id.startswith(self.devid[:9]): # id's vendor and device ID match
     7.5                  skey = id.split(':')
     7.6                  size = len(skey)
     7.7 -                if (size == 2):		# subvendor/subdevice not suplied
     7.8 +                if (size == 2): # subvendor/subdevice not suplied
     7.9                      ret = True
    7.10                      break
    7.11 -                elif (size == 4):	# check subvendor/subdevice
    7.12 +                elif (size == 4): # check subvendor/subdevice
    7.13                      # check subvendor
    7.14                      subven = '%04x' % self.subvendor
    7.15                      if ((skey[2] != 'FFFF') and 
     8.1 --- a/tools/python/xen/xend/sxp.py	Tue Jul 14 14:38:56 2009 +0100
     8.2 +++ b/tools/python/xen/xend/sxp.py	Tue Jul 14 14:43:19 2009 +0100
     8.3 @@ -730,7 +730,7 @@ def all_from_string(s):
     8.4  def parse(io):
     8.5      """Completely parse all input from 'io'.
     8.6  
     8.7 -    io	input file object
     8.8 +    io input file object
     8.9      returns list of values, None if incomplete
    8.10      raises ParseError on parse error
    8.11      """
     9.1 --- a/tools/python/xen/xm/create.py	Tue Jul 14 14:38:56 2009 +0100
     9.2 +++ b/tools/python/xen/xm/create.py	Tue Jul 14 14:43:19 2009 +0100
     9.3 @@ -367,7 +367,7 @@ gopts.var('vfb', val="vnc=1,sdl=1,vncunu
     9.4            given DISPLAY and XAUTHORITY, which default to the current user's
     9.5            ones.  OpenGL will be used by default unless opengl is set to 0.
     9.6            keymap overrides the XendD configured default layout file.
     9.7 -	  Serial adds a second serial support to qemu.
     9.8 +          Serial adds a second serial support to qemu.
     9.9            Monitor adds a backend for the stubdom monitor.""")
    9.10  
    9.11  gopts.var('vif', val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \
    10.1 --- a/tools/python/xen/xm/main.py	Tue Jul 14 14:38:56 2009 +0100
    10.2 +++ b/tools/python/xen/xm/main.py	Tue Jul 14 14:43:19 2009 +0100
    10.3 @@ -1794,8 +1794,8 @@ def xm_console(args):
    10.4      for (k, v) in options:
    10.5          if k in ['-q', '--quiet']:
    10.6              quiet = True
    10.7 -	elif k in ['-n', '--num']:
    10.8 -	    num = int(v[0])
    10.9 +        elif k in ['-n', '--num']:
   10.10 +            num = int(v[0])
   10.11          else:
   10.12              assert False
   10.13  
   10.14 @@ -2227,15 +2227,15 @@ def xm_pci_list(args):
   10.15          return
   10.16  
   10.17      def f(x):
   10.18 -	# The vfunc shouldn't be used for ordering if the vslot hasn't been
   10.19 -	# assigned as the output looks odd beacuse the vfunc isn't reported
   10.20 -	# but the (physical) function is.
   10.21 -	if x['vdevfn'] & AUTO_PHP_SLOT:
   10.22 -	    vdevfn = AUTO_PHP_SLOT
   10.23 -	else:
   10.24 -	    vdevfn = x['vdevfn']
   10.25 -        return (vdevfn << 32) | \
   10.26 -	       PCI_BDF(x['domain'], x['bus'], x['slot'], x['func'])
   10.27 +        # The vfunc shouldn't be used for ordering if the vslot hasn't been
   10.28 +        # assigned as the output looks odd beacuse the vfunc isn't reported
   10.29 +        # but the (physical) function is.
   10.30 +        if x['vdevfn'] & AUTO_PHP_SLOT:
   10.31 +            vdevfn = AUTO_PHP_SLOT
   10.32 +        else:
   10.33 +            vdevfn = x['vdevfn']
   10.34 +            return (vdevfn << 32) | \
   10.35 +                   PCI_BDF(x['domain'], x['bus'], x['slot'], x['func'])
   10.36      devs.sort(None, f)
   10.37  
   10.38      has_vdevfn = False
   10.39 @@ -2561,7 +2561,7 @@ def xm_pci_attach(args):
   10.40              vslot = PCI_SLOT(vdevfn)
   10.41              for i in dev:
   10.42                  i['vdevfn'] = '0x%02x' % \
   10.43 -		             PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16)))
   10.44 +                              PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16)))
   10.45  
   10.46      for i in dev:
   10.47          xm_pci_attach_one(dom, i)