[GRASS-SVN] r47399 - in grass/trunk: lib/python scripts/v.report
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 3 14:27:27 EDT 2011
Author: martinl
Date: 2011-08-03 11:27:27 -0700 (Wed, 03 Aug 2011)
New Revision: 47399
Modified:
grass/trunk/lib/python/core.py
grass/trunk/lib/python/task.py
grass/trunk/scripts/v.report/v.report.py
Log:
pythonlib: _decode - > decode
Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py 2011-08-03 18:20:47 UTC (rev 47398)
+++ grass/trunk/lib/python/core.py 2011-08-03 18:27:27 UTC (rev 47399)
@@ -77,7 +77,7 @@
"preexec_fn", "close_fds", "cwd", "env",
"universal_newlines", "startupinfo", "creationflags"]
-def _decode(string):
+def decode(string):
enc = locale.getdefaultlocale()[1]
if enc:
return string.decode(enc)
Modified: grass/trunk/lib/python/task.py
===================================================================
--- grass/trunk/lib/python/task.py 2011-08-03 18:20:47 UTC (rev 47398)
+++ grass/trunk/lib/python/task.py 2011-08-03 18:27:27 UTC (rev 47399)
@@ -430,11 +430,12 @@
cmdout, cmderr = Popen([cmd, '--interface-description'], stdout = PIPE,
stderr = PIPE).communicate()
except OSError, e:
- raise ScriptError, _("Unable to fetch interface description for command '%s'.") % cmd + \
- _("Details:") + "%s" % e
+ raise ScriptError, _("Unable to fetch interface description for command '%s'."
+ "\n\nDetails: %s") % (cmd, e)
+
if cmderr and cmderr[:7] != 'WARNING':
- raise ScriptError, _("Unable to fetch interface description for command '%s'.") % cmd + \
- _("Details:") + " %s" % cmderr
+ raise ScriptError, _("Unable to fetch interface description for command '%s'."
+ "\n\nDetails: %s") % (cmd, decode(cmderr))
return cmdout.replace('grass-interface.dtd', os.path.join(os.getenv('GISBASE'), 'etc', 'grass-interface.dtd'))
Modified: grass/trunk/scripts/v.report/v.report.py
===================================================================
--- grass/trunk/scripts/v.report/v.report.py 2011-08-03 18:20:47 UTC (rev 47398)
+++ grass/trunk/scripts/v.report/v.report.py 2011-08-03 18:27:27 UTC (rev 47399)
@@ -35,7 +35,7 @@
#% description: Data source for OGR access
#% required: yes
#%end
-#%option
+#%option G_OPT_V_MAP
#% key: layer
#% type: string
#% answer: 1
More information about the grass-commit
mailing list