[GRASS-dev] Re: [GRASS GIS] #630: "Mapset Access" broken (wxpython)

GRASS GIS trac at osgeo.org
Sun Jun 14 15:25:19 EDT 2009


#630: "Mapset Access" broken (wxpython)
-----------------------+----------------------------------------------------
  Reporter:  cnielsen  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect    |      Status:  new                      
  Priority:  normal    |   Milestone:  6.4.0                    
 Component:  wxGUI     |     Version:  6.4.0 RCs                
Resolution:            |    Keywords:                           
  Platform:  All       |         Cpu:  Unspecified              
-----------------------+----------------------------------------------------
Comment (by martinl):

 Replying to [comment:1 kyngchaos]:
 {{{
 >        ret = gcmd.RunCommand('g.mapsets',
 >                              flags = 'l',
 >                              read = True)
 >        mapsets = []
 >        if ret:
 >            mapsets = ret.rstrip(' \n').split(' ')
 }}}
 >
 > In line 1805, ret.rstrip(' \n').split(' '), only the trailing line feed
 is removed and not the line feed following the first line. Line 1805
 should be replaced with:
 >
 {{{
 > mapsets = ret.replace('\n','').split()
 }}}
 >
 > That way both the last line feed and any line feeds on multiple lines
 are removed. Using .split() removes the need to handle the trailing space.
 >
 > The change fixes the problem for me in 6.4RC4 and 6.4RC5. It also fixed
 a crash when starting wxpython and opening an existing workspace. Can
 someone with svn access verify my solution and fix this.

 Fixed in r37880 (devbr6), r37881 (relbr64) and r37882 (trunk).

 Martin

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/630#comment:3>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list