Procházet zdrojové kódy

wxGUI: cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42952 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa před 15 roky
rodič
revize
dd4cbc660e
2 změnil soubory, kde provedl 2 přidání a 3 odebrání
  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):
     def __init__(self, message, parent = None):
         caption = _('Error')
         caption = _('Error')
         style = wx.OK | wx.ICON_ERROR | wx.CENTRE
         style = wx.OK | wx.ICON_ERROR | wx.CENTRE
-        
         exc_type, exc_value, exc_traceback = sys.exc_info()
         exc_type, exc_value, exc_traceback = sys.exc_info()
         if exc_traceback:
         if exc_traceback:
             exception = traceback.format_exc()
             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:
         if Debug.get_level() > 0 and exc_traceback:
             sys.stderr.write(exception)
             sys.stderr.write(exception)

+ 1 - 1
gui/wxpython/wxgui.py

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