[GRASS-SVN] r63793 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 27 18:10:48 PST 2014


Author: annakrat
Date: 2014-12-27 18:10:48 -0800 (Sat, 27 Dec 2014)
New Revision: 63793

Modified:
   grass/trunk/gui/wxpython/dbmgr/base.py
Log:
wxGUI/dbmgr: fix editing values in attribute manager on Windows

Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2014-12-28 00:09:52 UTC (rev 63792)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2014-12-28 02:10:48 UTC (rev 63793)
@@ -242,8 +242,11 @@
         
         while True:
             # os.linesep doesn't work here (MSYS)
-            record = outFile.readline().replace('\n', '')
-            
+            # not sure what the replace is for?
+            # but we need strip to get rid of the ending newline
+            # which on windows leaves \r in a last empty attribute table cell and causes error
+            record = outFile.readline().strip().replace('\n', '')
+
             if not record:
                 break
 



More information about the grass-commit mailing list