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] [xen-unstable] python: Remove tab indents.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] python: Remove tab indents.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Jul 2009 05:35:14 -0700
Delivery-date: Wed, 15 Jul 2009 05:36:16 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1247578999 -3600
# Node ID e845326ae20387ea672e728f31a304cebc254afa
# Parent  4afd6669a351d14a623f37bb3fd525bf2705e09a
python: Remove tab indents.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/web/SrvBase.py          |    6 +++---
 tools/python/xen/web/SrvDir.py           |    2 +-
 tools/python/xen/xend/PrettyPrint.py     |   10 +++++-----
 tools/python/xen/xend/XendConfig.py      |   28 ++++++++++++++--------------
 tools/python/xen/xend/encode.py          |    2 +-
 tools/python/xen/xend/osdep.py           |   11 +++++------
 tools/python/xen/xend/server/pciquirk.py |    4 ++--
 tools/python/xen/xend/sxp.py             |    2 +-
 tools/python/xen/xm/create.py            |    2 +-
 tools/python/xen/xm/main.py              |   24 ++++++++++++------------
 10 files changed, 45 insertions(+), 46 deletions(-)

diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/web/SrvBase.py
--- a/tools/python/xen/web/SrvBase.py   Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/web/SrvBase.py   Tue Jul 14 14:43:19 2009 +0100
@@ -30,7 +30,7 @@ import httpserver
 
 def uri_pathlist(p):
     """Split a path into a list.
-    p          path
+    p path
     return list of path elements
     """
     l = []
@@ -51,7 +51,7 @@ class SrvBase(resource.Resource):
         """Get the method for an operation.
         For operation 'foo' looks for 'op_foo'.
 
-        op     operation name
+        op operation name
         returns method or None
         """
         op_method_name = 'op_' + op
@@ -67,7 +67,7 @@ class SrvBase(resource.Resource):
         and an HTML string otherwise (or list).
         Methods may also return a ThreadRequest (for incomplete processing).
 
-        req    request
+        req request
         """
         op = req.args.get('op')
         if op is None or len(op) != 1:
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/web/SrvDir.py
--- a/tools/python/xen/web/SrvDir.py    Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/web/SrvDir.py    Tue Jul 14 14:43:19 2009 +0100
@@ -37,7 +37,7 @@ class SrvConstructor:
         """Create a constructor. It is assumed that the class
         should be imported as 'from xen.xend.server.klass import klass'.
 
-        klass  name of its class
+        klass name of its class
         """
         self.klass = klass
         self.obj = None
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/PrettyPrint.py
--- a/tools/python/xen/xend/PrettyPrint.py      Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/PrettyPrint.py      Tue Jul 14 14:43:19 2009 +0100
@@ -284,9 +284,9 @@ def prettyprint(sxpr, out=sys.stdout, wi
 def prettyprint(sxpr, out=sys.stdout, width=80):
     """Prettyprint an SXP form.
 
-    sxpr       s-expression
-    out                destination
-    width      maximum output width
+    sxpr  s-expression
+    out   destination
+    width maximum output width
     """
     if isinstance(sxpr, types.ListType):
         pp = SXPPrettyPrinter(width=width)
@@ -299,8 +299,8 @@ def prettyprintstring(sxpr, width=80):
 def prettyprintstring(sxpr, width=80):
     """Prettyprint an SXP form to a string.
 
-    sxpr       s-expression
-    width      maximum output width
+    sxpr  s-expression
+    width maximum output width
     """
     io = StringIO.StringIO()
     prettyprint(sxpr, out=io, width=width)
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Tue Jul 14 14:43:19 2009 +0100
@@ -1437,20 +1437,20 @@ class XendConfig(dict):
                 if dev_uuid not in target['console_refs']:
                     target['console_refs'].append(dev_uuid)
 
-               # Cope with old-format save files which say under vfb
-               # (type vfb) rather than (vfb 1)
-               try:
-                   vfb_type = dev_info['type']
-               except KeyError:
-                   vfb_type = None
-               log.debug("iwj dev_type=%s vfb type %s" %
-                       (dev_type, `vfb_type`))
-
-               if vfb_type == 'vnc' or vfb_type == 'sdl':
-                   dev_info[vfb_type] = 1
-                   del dev_info['type']
-                   log.debug("iwj dev_type=%s vfb setting dev_info['%s']" %
-                               (dev_type, vfb_type))
+                # Cope with old-format save files which say under vfb
+                # (type vfb) rather than (vfb 1)
+                try:
+                    vfb_type = dev_info['type']
+                except KeyError:
+                    vfb_type = None
+                log.debug("iwj dev_type=%s vfb type %s" %
+                          (dev_type, `vfb_type`))
+
+                if vfb_type == 'vnc' or vfb_type == 'sdl':
+                    dev_info[vfb_type] = 1
+                    del dev_info['type']
+                    log.debug("iwj dev_type=%s vfb setting dev_info['%s']" %
+                              (dev_type, vfb_type))
                 # Create serial backends now, the location value is bogus, but 
does not matter
                 i=0
                 chardev=0
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/encode.py
--- a/tools/python/xen/xend/encode.py   Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/encode.py   Tue Jul 14 14:43:19 2009 +0100
@@ -97,7 +97,7 @@ def encode_data(d):
     """Encode some data for HTTP transport.
     The encoding used is stored in 'Content-Type' in the headers.
 
-    d  data - sequence of tuples or dictionary
+    d data - sequence of tuples or dictionary
     returns a 2-tuple of the headers and the encoded data
     """
     val = ({}, None)
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py    Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/osdep.py    Tue Jul 14 14:43:19 2009 +0100
@@ -72,12 +72,11 @@ def _linux_balloon_stat_sysfs(label):
     return None
 
 def _linux_balloon_stat(label):
-       if os.access(PROC_XEN_BALLOON, os.F_OK):
-               return _linux_balloon_stat_proc(label)
-       elif os.access(SYSFS_XEN_MEMORY, os.F_OK):
-               return _linux_balloon_stat_sysfs(label)
-
-       return None
+    if os.access(PROC_XEN_BALLOON, os.F_OK):
+        return _linux_balloon_stat_proc(label)
+    elif os.access(SYSFS_XEN_MEMORY, os.F_OK):
+        return _linux_balloon_stat_sysfs(label)
+    return None
 
 def _solaris_balloon_stat(label):
     """Returns the value for the named label, or None if an error occurs."""
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/server/pciquirk.py
--- a/tools/python/xen/xend/server/pciquirk.py  Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/server/pciquirk.py  Tue Jul 14 14:43:19 2009 +0100
@@ -37,10 +37,10 @@ class PCIQuirk:
             if id.startswith(self.devid[:9]): # id's vendor and device ID match
                 skey = id.split(':')
                 size = len(skey)
-                if (size == 2):                # subvendor/subdevice not 
suplied
+                if (size == 2): # subvendor/subdevice not suplied
                     ret = True
                     break
-                elif (size == 4):      # check subvendor/subdevice
+                elif (size == 4): # check subvendor/subdevice
                     # check subvendor
                     subven = '%04x' % self.subvendor
                     if ((skey[2] != 'FFFF') and 
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xend/sxp.py
--- a/tools/python/xen/xend/sxp.py      Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xend/sxp.py      Tue Jul 14 14:43:19 2009 +0100
@@ -730,7 +730,7 @@ def parse(io):
 def parse(io):
     """Completely parse all input from 'io'.
 
-    io input file object
+    io input file object
     returns list of values, None if incomplete
     raises ParseError on parse error
     """
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xm/create.py     Tue Jul 14 14:43:19 2009 +0100
@@ -367,7 +367,7 @@ gopts.var('vfb', val="vnc=1,sdl=1,vncunu
           given DISPLAY and XAUTHORITY, which default to the current user's
           ones.  OpenGL will be used by default unless opengl is set to 0.
           keymap overrides the XendD configured default layout file.
-         Serial adds a second serial support to qemu.
+          Serial adds a second serial support to qemu.
           Monitor adds a backend for the stubdom monitor.""")
 
 gopts.var('vif', 
val="type=TYPE,mac=MAC,bridge=BRIDGE,ip=IPADDR,script=SCRIPT," + \
diff -r 4afd6669a351 -r e845326ae203 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Jul 14 14:38:56 2009 +0100
+++ b/tools/python/xen/xm/main.py       Tue Jul 14 14:43:19 2009 +0100
@@ -1794,8 +1794,8 @@ def xm_console(args):
     for (k, v) in options:
         if k in ['-q', '--quiet']:
             quiet = True
-       elif k in ['-n', '--num']:
-           num = int(v[0])
+        elif k in ['-n', '--num']:
+            num = int(v[0])
         else:
             assert False
 
@@ -2227,15 +2227,15 @@ def xm_pci_list(args):
         return
 
     def f(x):
-       # The vfunc shouldn't be used for ordering if the vslot hasn't been
-       # assigned as the output looks odd beacuse the vfunc isn't reported
-       # but the (physical) function is.
-       if x['vdevfn'] & AUTO_PHP_SLOT:
-           vdevfn = AUTO_PHP_SLOT
-       else:
-           vdevfn = x['vdevfn']
-        return (vdevfn << 32) | \
-              PCI_BDF(x['domain'], x['bus'], x['slot'], x['func'])
+        # The vfunc shouldn't be used for ordering if the vslot hasn't been
+        # assigned as the output looks odd beacuse the vfunc isn't reported
+        # but the (physical) function is.
+        if x['vdevfn'] & AUTO_PHP_SLOT:
+            vdevfn = AUTO_PHP_SLOT
+        else:
+            vdevfn = x['vdevfn']
+            return (vdevfn << 32) | \
+                   PCI_BDF(x['domain'], x['bus'], x['slot'], x['func'])
     devs.sort(None, f)
 
     has_vdevfn = False
@@ -2561,7 +2561,7 @@ def xm_pci_attach(args):
             vslot = PCI_SLOT(vdevfn)
             for i in dev:
                 i['vdevfn'] = '0x%02x' % \
-                            PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16)))
+                              PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16)))
 
     for i in dev:
         xm_pci_attach_one(dom, i)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] python: Remove tab indents., Xen patchbot-unstable <=