Bladeren bron

wxGUI: fix missing quotes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52154 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 13 jaren geleden
bovenliggende
commit
e9f82cb0cc
2 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 5 5
      gui/wxpython/gui_core/goutput.py
  2. 1 1
      lib/python/db.py

+ 5 - 5
gui/wxpython/gui_core/goutput.py

@@ -489,7 +489,7 @@ class GMConsole(wx.SplitterWindow):
             fileHistory = codecs.open(filePath, encoding = 'utf-8', mode = 'a')
         except IOError, e:
             GError(_("Unable to write file '%(filePath)s'.\n\nDetails: %(error)s") % 
-                    {filePath: filePath, error : e },
+                    {'filePath': filePath, 'error' : e },
                    parent = self.parent)
             fileHistory = None
         
@@ -658,7 +658,7 @@ class GMConsole(wx.SplitterWindow):
         dlg = wx.FileDialog(self, message = _("Save file as..."),
                             defaultFile = "grass_cmd_output.txt",
                             wildcard = _("%(txt)s (*.txt)|*.txt|%(files)s (*)|*") % 
-                            {txt: _("Text files"), files: _("Files")},
+                            {'txt': _("Text files"), 'files': _("Files")},
                             style = wx.SAVE | wx.FD_OVERWRITE_PROMPT)
         
         # Show the dialog and retrieve the user response. If it is the OK response,
@@ -670,7 +670,7 @@ class GMConsole(wx.SplitterWindow):
                 output = open(path, "w")
                 output.write(text)
             except IOError, e:
-                GError(_("Unable to write file '%(path)s'.\n\nDetails: %(error)s") % {path: path, error: e})
+                GError(_("Unable to write file '%(path)s'.\n\nDetails: %(error)s") % {'path': path, 'error': e})
             finally:
                 output.close()
             self.parent.SetStatusText(_("Commands output saved into '%s'") % path)
@@ -784,7 +784,7 @@ class GMConsole(wx.SplitterWindow):
                 output.write('\n')
         except IOError, e:
             GError(_("Unable to write file '%(filePath)s'.\n\nDetails: %(error)s") % 
-                    {filePath: self.cmdFileProtocol, error: e})
+                    {'filePath': self.cmdFileProtocol, 'error': e})
         finally:
             output.close()
             
@@ -804,7 +804,7 @@ class GMConsole(wx.SplitterWindow):
             dlg = wx.FileDialog(self, message = _("Save file as..."),
                                 defaultFile = "grass_cmd_protocol.txt",
                                 wildcard = _("%(txt)s (*.txt)|*.txt|%(files)s (*)|*") % 
-                                            {txt: _("Text files"), files: _("Files")},
+                                            {'txt': _("Text files"), 'files': _("Files")},
                                 style = wx.SAVE | wx.FD_OVERWRITE_PROMPT)
             if dlg.ShowModal() == wx.ID_OK:
                 self.cmdFileProtocol = dlg.GetPath()

+ 1 - 1
lib/python/db.py

@@ -133,7 +133,7 @@ def db_select(sql = None, filename = None, table = None, **args):
         args['table'] = table
     else:
         fatal(_("Programmer error: '%(sql)s', '%(filename)s', or '%(table)s' must be provided") %
-              {sql: 'sql', filename: 'filename', table: 'table'} )
+              {'sql': 'sql', 'filename': 'filename', 'table': 'table'} )
     
     if 'fs' not in args:
         args['fs'] = '|'