[GRASS-SVN] r61764 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 28 03:45:09 PDT 2014
Author: lucadelu
Date: 2014-08-28 03:45:09 -0700 (Thu, 28 Aug 2014)
New Revision: 61764
Modified:
grass/trunk/gui/wxpython/gui_core/preferences.py
Log:
wxgui core: fix uid bug when uid is missing, for example with network shared data
Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py 2014-08-27 21:16:03 UTC (rev 61763)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py 2014-08-28 10:45:09 UTC (rev 61764)
@@ -1776,7 +1776,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