From 6960053c95a021dfd62f7ab015b18f5edb4bd2de Mon Sep 17 00:00:00 2001
From: Anders Wallin <anders.e.e.wallin@gmail.com>
Date: Mon, 24 Dec 2012 15:04:03 +0200
Subject: [PATCH 1/2] use spaces, not tabs, for whitespace

---
 lib/python/vcpparse.py |   44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/lib/python/vcpparse.py b/lib/python/vcpparse.py
index 77d2795..cf13313 100644
--- a/lib/python/vcpparse.py
+++ b/lib/python/vcpparse.py
@@ -47,7 +47,7 @@ def read_file():
         doc = xml.dom.minidom.parse(filename) 
     except xml.parsers.expat.ExpatError, detail:
         print "Error: could not open",filename,"!"
-	print detail
+        print detail
         sys.exit(1)
     # find the pydoc element
     for e in doc.childNodes:
@@ -92,23 +92,23 @@ def widget_creator(parent,widget_name,params):
   
     constructor = getattr(pyvcp_widgets, "pyvcp_" + str(widget_name))
     if hasattr(parent, "getcontainer"):
-	container = parent.getcontainer()
+        container = parent.getcontainer()
     else:
-	container = parent
+        container = parent
     positional_params = (container, pycomp)
     
     try:
-	widget = constructor(*positional_params, **params)
+        widget = constructor(*positional_params, **params)
     except Exception, detail:
-	raise SystemExit, "Error constructing %s(%s):\n%s" % (
-			widget_name, params, detail)
+        raise SystemExit, "Error constructing %s(%s):\n%s" % (
+            widget_name, params, detail)
 
     # pack the widget according to parent
     # either hbox or vbox
     if container==pyvcp0:
-	widget.pack(side='top', fill=BOTH, expand=YES)
+        widget.pack(side='top', fill=BOTH, expand=YES)
     else:
-	parent.add(container, widget)
+        parent.add(container, widget)
    
     # add the widget to a global list widgets
     # to enable calling update() later
@@ -120,21 +120,21 @@ def paramiterator(node):
     """ returns a list of all parameters for a widget element """
     outparams = {}
     for k, v in node.attributes.items():
-	if v and v[0] in "{[(\"'":
-	    v = eval(v)
-	else:
-	    try:
-		v = int(v)
-	    except ValueError:
-		try:
-		    v = float(v)
-		except ValueError:
-		    pass
-	outparams[str(k)] = v
+        if v and v[0] in "{[(\"'":
+            v = eval(v)
+        else:
+            try:
+                v = int(v)
+            except ValueError:
+                try:
+                    v = float(v)
+                except ValueError:
+                    pass
+        outparams[str(k)] = v
 
     for e in node.childNodes:
-	if e.nodeType == e.ELEMENT_NODE \
-		and (e.nodeName not in pyvcp_widgets.elements):
+        if e.nodeType == e.ELEMENT_NODE \
+            and (e.nodeName not in pyvcp_widgets.elements):
             try:
                 v = eval(e.childNodes[0].nodeValue)
             except: 
@@ -142,7 +142,7 @@ def paramiterator(node):
                 raise SystemExit, ("Error evaluating xml file:\n"
                     "Widget %s, Property %s\n%s: %s") % (
                         node.nodeName, e.nodeName, exc_type.__name__, exc_value)
-	    outparams[str(e.nodeName)] = v
+            outparams[str(e.nodeName)] = v
     return outparams
 
 
-- 
1.7.10.4

