[GRASS-SVN] r65291 - grass/trunk/gui/wxpython/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 20 06:04:08 PDT 2015


Author: annakrat
Date: 2015-05-20 06:04:08 -0700 (Wed, 20 May 2015)
New Revision: 65291

Modified:
   grass/trunk/gui/wxpython/modules/mapsets_picker.py
Log:
g.mapset: dialog must be destroyed, app.MainLoop seems not necessary here; remove unused imports, whitespace clean up

Modified: grass/trunk/gui/wxpython/modules/mapsets_picker.py
===================================================================
--- grass/trunk/gui/wxpython/modules/mapsets_picker.py	2015-05-20 08:31:44 UTC (rev 65290)
+++ grass/trunk/gui/wxpython/modules/mapsets_picker.py	2015-05-20 13:04:08 UTC (rev 65291)
@@ -1,33 +1,27 @@
 #!/usr/bin/env python
 
-import os
-import sys
-import pwd
-
-from grass.script import core as grass
-
 import wx
-import wx.lib.mixins.listctrl as listmix
 
-from core.gcmd import RunCommand 
+from core.gcmd import RunCommand
 from core.utils import _
 from gui_core.preferences import MapsetAccess
 
+
 def main():
     app = wx.App()
 
     dlg = MapsetAccess(parent = None)
     dlg.CenterOnScreen()
-        
+
     if dlg.ShowModal() == wx.ID_OK:
         ms = dlg.GetMapsets()
         RunCommand('g.mapsets',
                    parent = None,
                    mapset = '%s' % ','.join(ms),
                    operation = 'set')
-    
-    app.MainLoop()
 
+    dlg.Destroy()
+
+
 if __name__ == "__main__":
     main()
-



More information about the grass-commit mailing list