Procházet zdrojové kódy

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á před 11 roky
rodič
revize
8eb6790818
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  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():
     # 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__":