[GRASS-SVN] r40002 - grass/branches/develbranch_6/gui/wxpython

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


Author: cmbarton
Date: 2009-12-14 12:14:54 -0500 (Mon, 14 Dec 2009)
New Revision: 40002

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

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2009-12-14 17:13:16 UTC (rev 40001)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2009-12-14 17:14:54 UTC (rev 40002)
@@ -979,11 +979,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:
             gcmd.RunCommand('d.mon',



More information about the grass-commit mailing list