Prechádzať zdrojové kódy

wxGUI: showTraceback

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45739 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 rokov pred
rodič
commit
54e34a3660
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      gui/wxpython/gui_modules/gcmd.py

+ 2 - 2
gui/wxpython/gui_modules/gcmd.py

@@ -59,7 +59,7 @@ import utils
 from debug import Debug as Debug
 
 class GError:
-    def __init__(self, message, parent = None, caption = None):
+    def __init__(self, message, parent = None, caption = None, showTraceback = True):
         if not caption:
             caption = _('Error')
         style = wx.OK | wx.ICON_ERROR | wx.CENTRE
@@ -71,7 +71,7 @@ class GError:
         if Debug.GetLevel() > 0 and exc_traceback:
             sys.stderr.write(exception)
         
-        if exc_traceback:
+        if showTraceback and exc_traceback:
             wx.MessageBox(parent = parent,
                           message = message + '\n\n%s: %s\n\n%s' % \
                               (_('Reason'),