[GRASS-SVN] r52051 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 12 09:44:49 PDT 2012


Author: martinl
Date: 2012-06-12 09:44:49 -0700 (Tue, 12 Jun 2012)
New Revision: 52051

Modified:
   grass/trunk/lib/python/core.py
Log:
libpython: parse_key_val() - strip also value


Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py	2012-06-12 16:44:19 UTC (rev 52050)
+++ grass/trunk/lib/python/core.py	2012-06-12 16:44:49 UTC (rev 52051)
@@ -539,13 +539,15 @@
 	kv = line.split(sep, 1)
 	k = kv[0].strip()
 	if len(kv) > 1:
-	    v = kv[1]
+	    v = kv[1].strip()
 	else:
 	    v = dflt
+        
         if val_type:
             result[k] = val_type(v)
         else:
             result[k] = v
+    
     return result
 
 # interface to g.gisenv



More information about the grass-commit mailing list