[GRASS-SVN] r57904 - grass/trunk/scripts/r.out.xyz

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 1 06:52:35 PDT 2013


Author: annakrat
Date: 2013-10-01 06:52:35 -0700 (Tue, 01 Oct 2013)
New Revision: 57904

Modified:
   grass/trunk/scripts/r.out.xyz/r.out.xyz.py
Log:
r.out.xyz: fix for the case when output is not set

Modified: grass/trunk/scripts/r.out.xyz/r.out.xyz.py
===================================================================
--- grass/trunk/scripts/r.out.xyz/r.out.xyz.py	2013-10-01 13:34:10 UTC (rev 57903)
+++ grass/trunk/scripts/r.out.xyz/r.out.xyz.py	2013-10-01 13:52:35 UTC (rev 57904)
@@ -38,8 +38,11 @@
 def main():
     # if no output filename, output to stdout
     output = options['output']
+    if not output:
+        output = '-'
 
-    ret = grass.run_command("r.stats", flags = "1gn", input = options['input'], sep = options['separator'], output = output)
+    ret = grass.run_command("r.stats", flags="1gn", input=options['input'],
+                            sep=options['separator'], output=output)
     sys.exit(ret)
 
 if __name__ == "__main__":



More information about the grass-commit mailing list