[GRASS-SVN] r40001 - grass/branches/releasebranch_6_4/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 14 12:13:17 EST 2009


Author: cmbarton
Date: 2009-12-14 12:13:16 -0500 (Mon, 14 Dec 2009)
New Revision: 40001

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
Trap error of missing xterm on Mac

Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2009-12-14 17:06:55 UTC (rev 40000)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2009-12-14 17:13:16 UTC (rev 40001)
@@ -996,11 +996,15 @@
                 
         if sys.platform == "darwin":
 
-            cmdlist = ['xterm', '-e', 'd.mon', xmon]
-            p = gcmd.Command(cmdlist, wait=False)
+            try:
+                cmdlist = ['xterm', '-e', 'd.mon', xmon]
+                p = gcmd.Command(cmdlist, wait=False)
 
-            cmdlist = ['xterm', '-e', command]
-            q = gcmd.Command(cmdlist, wait=False)
+                cmdlist = ['xterm', '-e', command]
+                q = gcmd.Command(cmdlist, wait=False)
+            except:
+                wx.MessageBox(_('Requires an xterm and could not find an xterm to launch'),
+                              _('Command %s could not be run') % cmdlist[0])
 
         else:        
             cmdlist = ["d.mon","start=%s" % xmon]



More information about the grass-commit mailing list