[GRASS-SVN] r50671 - in grass/trunk/gui/wxpython: nviz vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 5 12:43:37 EST 2012
Author: martinl
Date: 2012-02-05 09:43:37 -0800 (Sun, 05 Feb 2012)
New Revision: 50671
Modified:
grass/trunk/gui/wxpython/nviz/wxnviz.py
grass/trunk/gui/wxpython/vdigit/main.py
grass/trunk/gui/wxpython/vdigit/wxdisplay.py
Log:
wxGUI: attempt to fix #1563 (wxGUI will not start)
Modified: grass/trunk/gui/wxpython/nviz/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/wxnviz.py 2012-02-05 17:19:12 UTC (rev 50670)
+++ grass/trunk/gui/wxpython/nviz/wxnviz.py 2012-02-05 17:43:37 UTC (rev 50671)
@@ -75,10 +75,13 @@
return 0
-errtype = CFUNCTYPE(UNCHECKED(c_int), String, c_int)
-errfunc = errtype(print_error)
-pertype = CFUNCTYPE(UNCHECKED(c_int), c_int)
-perfunc = pertype(print_progress)
+try:
+ errtype = CFUNCTYPE(UNCHECKED(c_int), String, c_int)
+ errfunc = errtype(print_error)
+ pertype = CFUNCTYPE(UNCHECKED(c_int), c_int)
+ perfunc = pertype(print_progress)
+except NameError:
+ pass
class Nviz(object):
def __init__(self, glog, gprogress):
Modified: grass/trunk/gui/wxpython/vdigit/main.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/main.py 2012-02-05 17:19:12 UTC (rev 50670)
+++ grass/trunk/gui/wxpython/vdigit/main.py 2012-02-05 17:43:37 UTC (rev 50671)
@@ -15,7 +15,7 @@
"""
try:
- from vdigit.wxdigit import IVDigit, GV_LINES
+ from vdigit.wxdigit import IVDigit, GV_LINES, CFUNCTYPE
haveVDigit = True
errorMsg = ''
except (ImportError, NameError), err:
Modified: grass/trunk/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2012-02-05 17:19:12 UTC (rev 50670)
+++ grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2012-02-05 17:43:37 UTC (rev 50671)
@@ -67,11 +67,14 @@
return ret
-errtype = CFUNCTYPE(UNCHECKED(c_int), String, c_int)
-errfunc = errtype(print_error)
-pertype = CFUNCTYPE(UNCHECKED(c_int), c_int)
-perfunc = pertype(print_progress)
-
+try:
+ errtype = CFUNCTYPE(UNCHECKED(c_int), String, c_int)
+ errfunc = errtype(print_error)
+ pertype = CFUNCTYPE(UNCHECKED(c_int), c_int)
+ perfunc = pertype(print_progress)
+except NameError:
+ pass
+
class DisplayDriver:
def __init__(self, device, deviceTmp, mapObj, window, glog, gprogress):
"""!Display driver used by vector digitizer
More information about the grass-commit
mailing list