瀏覽代碼

r.out.xyz: fix for the case when output is not set

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57904 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父節點
當前提交
8eb6790818
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      scripts/r.out.xyz/r.out.xyz.py

+ 4 - 1
scripts/r.out.xyz/r.out.xyz.py

@@ -38,8 +38,11 @@ from grass.script import core as grass
 def main():
 def main():
     # if no output filename, output to stdout
     # if no output filename, output to stdout
     output = options['output']
     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)
     sys.exit(ret)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":