[GRASS-SVN] r61765 - in grass/branches/releasebranch_7_0: . gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 28 03:50:34 PDT 2014


Author: lucadelu
Date: 2014-08-28 03:50:34 -0700 (Thu, 28 Aug 2014)
New Revision: 61765

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py
Log:
wxgui core: fix uid bug when uid is missing, for example with network shared data (trunk, r61764)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Added: svn:mergeinfo
   + /grass/trunk:61764

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py	2014-08-28 10:45:09 UTC (rev 61764)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/preferences.py	2014-08-28 10:50:34 UTC (rev 61765)
@@ -1775,7 +1775,10 @@
                                       mapset)
             stat_info = os.stat(mapsetPath)
             if havePwd:
-                self.SetStringItem(index, 1, "%s" % pwd.getpwuid(stat_info.st_uid)[0])
+                try:
+                    self.SetStringItem(index, 1, "%s" % pwd.getpwuid(stat_info.st_uid)[0])
+                except KeyError:
+                    self.SetStringItem(index, 1, "nobody")
                 # FIXME: get group name
                 ### self.SetStringItem(index, 2, "%-8s" % stat_info.st_gid) 
             else:



More information about the grass-commit mailing list