Explorar o código

wxGUI: cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42952 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=15) %!d(string=hai) anos
pai
achega
dd4cbc660e
Modificáronse 2 ficheiros con 2 adicións e 3 borrados
  1. 1 2
      gui/wxpython/gui_modules/gcmd.py
  2. 1 1
      gui/wxpython/wxgui.py

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

@@ -61,11 +61,10 @@ class GError:
     def __init__(self, message, parent = None):
         caption = _('Error')
         style = wx.OK | wx.ICON_ERROR | wx.CENTRE
-        
         exc_type, exc_value, exc_traceback = sys.exc_info()
         if exc_traceback:
             exception = traceback.format_exc()
-            reason = exception.splitlines()[-2].split(':', 1)[-1].strip()
+            reason = exception.splitlines()[-1].split(':', 1)[-1].strip()
         
         if Debug.get_level() > 0 and exc_traceback:
             sys.stderr.write(exception)

+ 1 - 1
gui/wxpython/wxgui.py

@@ -627,7 +627,7 @@ class GMFrame(wx.Frame):
         try:
             gxwXml = workspace.ProcessWorkspaceFile(etree.parse(filename))
         except Exception, e:
-            gcmd.GError(parent = self.parent,
+            gcmd.GError(parent = self,
                         message = _("Reading workspace file <%s> failed.\n"
                                     "Invalid file, unable to parse XML document.") % filename)
             return