[GRASS-dev] Re: [GRASS GIS] #1491: python libs shouldn't parse freeform text fields with parse_key_val()

GRASS GIS trac at osgeo.org
Mon Nov 14 05:12:00 EST 2011


#1491: python libs shouldn't parse freeform text fields with parse_key_val()
---------------------+------------------------------------------------------
 Reporter:  hamish   |       Owner:  grass-dev@…              
     Type:  defect   |      Status:  new                      
 Priority:  normal   |   Milestone:  7.0.0                    
Component:  Python   |     Version:  svn-trunk                
 Keywords:  parsing  |    Platform:  All                      
      Cpu:  All      |  
---------------------+------------------------------------------------------

Comment(by huhabla):

 A solution would be that parse_key_val() accepts only the first "=" to
 create the key value pair. In case of free form text, the reporting module
 should put the info in double quotes, escaping all other double quotes
 located in the message content.

 So parse_key_val() is able to detect any content with quotes and new lines
 as values.

 Using several different and between the modules inconsistent flags to
 print content in shell style is IMHO not a better solution.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1491#comment:1>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list