[GRASS-SVN] r35170 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 2 16:34:27 EST 2009


Author: martinl
Date: 2009-01-02 16:34:26 -0500 (Fri, 02 Jan 2009)
New Revision: 35170

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: use grass.run_command instead gcmd.Command() (2)

Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2009-01-02 21:33:01 UTC (rev 35169)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2009-01-02 21:34:26 UTC (rev 35170)
@@ -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