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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 27 20:01:47 EDT 2008


Author: glynn
Date: 2008-09-27 20:01:47 -0400 (Sat, 27 Sep 2008)
New Revision: 33577

Modified:
   grass/trunk/lib/python/grass.py
Log:
Allow option names to be given a leading underscore
 (in case of conflict with Python keywords)


Modified: grass/trunk/lib/python/grass.py
===================================================================
--- grass/trunk/lib/python/grass.py	2008-09-27 23:46:03 UTC (rev 33576)
+++ grass/trunk/lib/python/grass.py	2008-09-28 00:01:47 UTC (rev 33577)
@@ -32,6 +32,8 @@
 	args.append("-%s" % flags)
     for opt, val in options.iteritems():
 	if val != None:
+	    if opt[0] == '_':
+		opt = opt[1:]
 	    args.append("%s=%s" % (opt, _make_val(val)))
     return args
 



More information about the grass-commit mailing list