[cig-commits] r19275 - cs/pythia/trunk/pyre/inventory/properties

brad at geodynamics.org brad at geodynamics.org
Tue Dec 6 16:05:16 PST 2011


Author: brad
Date: 2011-12-06 16:05:15 -0800 (Tue, 06 Dec 2011)
New Revision: 19275

Modified:
   cs/pythia/trunk/pyre/inventory/properties/Array.py
   cs/pythia/trunk/pyre/inventory/properties/List.py
Log:
Allow whitespace in property lists and arrays.

Modified: cs/pythia/trunk/pyre/inventory/properties/Array.py
===================================================================
--- cs/pythia/trunk/pyre/inventory/properties/Array.py	2011-12-06 23:11:41 UTC (rev 19274)
+++ cs/pythia/trunk/pyre/inventory/properties/Array.py	2011-12-07 00:05:15 UTC (rev 19275)
@@ -36,7 +36,11 @@
             if text and text[-1] in '])}':
                 text = text[:-1]
                 
-            value = text.split(",")
+            #value = text.split(",")
+            value = []
+            for v in text.split(","):
+                value.append(v.strip())
+
         else:
             value = text
 

Modified: cs/pythia/trunk/pyre/inventory/properties/List.py
===================================================================
--- cs/pythia/trunk/pyre/inventory/properties/List.py	2011-12-06 23:11:41 UTC (rev 19274)
+++ cs/pythia/trunk/pyre/inventory/properties/List.py	2011-12-07 00:05:15 UTC (rev 19275)
@@ -32,7 +32,10 @@
             if text and text[-1] in '])}':
                 text = text[:-1]
                 
-            value = text.split(",")
+            #value = text.split(",")
+            value = []
+            for v in text.split(","):
+                value.append(v.strip())
 
             # allow trailing comma
             if len(value) and not value[-1]:



More information about the CIG-COMMITS mailing list