[GRASS-SVN] r35173 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 2 16:51:08 EST 2009


Author: martinl
Date: 2009-01-02 16:51:08 -0500 (Fri, 02 Jan 2009)
New Revision: 35173

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: use grass.run_command instead gcmd.Command() (2)
       (merge from trunk, r35170)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2009-01-02 21:47:38 UTC (rev 35172)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2009-01-02 21:51:08 UTC (rev 35173)
@@ -1003,14 +1003,12 @@
         path = event.GetString()
 
         if self.inputType == 'dxf':
-            try:
-                cmd = gcmd.Command(['v.in.dxf',
-                                    'input=%s' % path,
-                                    '-l', '--q'], stderr=None)
-            except gcmd.CmdError, e:
-                wx.MessageBox(parent=self, message=_("File <%(file)s>: Unable to get list of DXF layers.\n\n%(details)s") % \
-                              { 'file' : path, 'details' : e.message },
-                              caption=_("Error"), style=wx.ID_OK | wx.ICON_ERROR | wx.CENTRE)
+            ret = gcmd.RunCommand('v.in.dxf',
+                                  quiet = True,
+                                  parent = self,
+                                  flags = 'l',
+                                  input = path)
+            if ret != 0:
                 self.list.LoadData()
                 self.btn_run.Enable(False)
                 return



More information about the grass-commit mailing list