[GRASS-SVN] r43012 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Aug 7 04:48:33 EDT 2010
Author: martinl
Date: 2010-08-07 08:48:33 +0000 (Sat, 07 Aug 2010)
New Revision: 43012
Modified:
grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
Log:
wxGUI/nviz: use log class instead of print
Modified: grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-06 21:53:48 UTC (rev 43011)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-07 08:48:33 UTC (rev 43012)
@@ -588,9 +588,9 @@
if id < 0:
if layer.type in ('raster', '3d-raster'):
- print >> sys.stderr, "Nviz:" + "%s <%s> %s" % (errorMsg, layer.name, _("failed"))
+ self.log.WriteError("%s <%s> %s" % (errorMsg, layer.name, _("failed")))
else:
- print >> sys.stderr, "Nviz:" + _("Unsupported layer type '%s'") % layer.type
+ self.log.WriteError(_("Unsupported layer type '%s'") % layer.type)
self.layers.append(item)
@@ -655,9 +655,9 @@
id = data[nvizType]['object']['id']
if unloadFn(id) == 0:
- print >> sys.stderr, "Nviz:" + "%s <%s>" % (errorMsg, layer.name)
+ self.log.WriteError("%s <%s>" % (errorMsg, layer.name))
else:
- print "Nviz:" + "%s <%s> %s" % (successMsg, layer.name, _("unloaded successfully"))
+ self.log.WriteLog("%s <%s> %s" % (successMsg, layer.name, _("unloaded successfully")))
data[nvizType].pop('object')
@@ -709,8 +709,8 @@
else:
id = self._display.LoadVector(str(layer.GetName()), True)
if id < 0:
- print >> sys.stderr, "Nviz:" + _("Loading vector map <%(name)s> (%(type)s) failed") % \
- { 'name' : layer.name, 'type' : vecType }
+ self.log.WriteError(_("Loading vector map <%(name)s> (%(type)s) failed") % \
+ { 'name' : layer.name, 'type' : vecType })
# update layer properties
self.SetMapObjProperties(item, id, vecType)
@@ -765,11 +765,11 @@
else:
ret = self._display.UnloadVector(id, True)
if ret == 0:
- print >> sys.stderr, "Nviz:" + _("Unable to unload vector map <%(name)s> (%(type)s)") % \
- { 'name': layer.name, 'type' : vecType }
+ self.log.WriteError(_("Unable to unload vector map <%(name)s> (%(type)s)") % \
+ { 'name': layer.name, 'type' : vecType })
else:
- print "Nviz:" + _("Vector map <%(name)s> (%(type)s) unloaded successfully") % \
- { 'name' : layer.name, 'type' : vecType }
+ self.log.WriteLog(_("Vector map <%(name)s> (%(type)s) unloaded successfully") % \
+ { 'name' : layer.name, 'type' : vecType })
data[vecType].pop('object')
More information about the grass-commit
mailing list