Quellcode durchsuchen

wxGUI/dbmgr: fix editing values in attribute manager on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63793 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová vor 10 Jahren
Ursprung
Commit
5d4e912778
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5 2
      gui/wxpython/dbmgr/base.py

+ 5 - 2
gui/wxpython/dbmgr/base.py

@@ -242,8 +242,11 @@ class VirtualAttributeList(wx.ListCtrl,
         
         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