[GRASS-SVN] r48203 - grass/trunk/scripts/m.proj
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 8 04:24:40 EDT 2011
Author: glynn
Date: 2011-09-08 01:24:40 -0700 (Thu, 08 Sep 2011)
New Revision: 48203
Modified:
grass/trunk/scripts/m.proj/m.proj.py
Log:
Fix deadlock
Modified: grass/trunk/scripts/m.proj/m.proj.py
===================================================================
--- grass/trunk/scripts/m.proj/m.proj.py 2011-09-08 07:13:02 UTC (rev 48202)
+++ grass/trunk/scripts/m.proj/m.proj.py 2011-09-08 08:24:40 UTC (rev 48203)
@@ -235,7 +235,7 @@
# cs2cs | sed -e 's/d/:/g' -e "s/'/:/g" -e 's/"//g'
cmd = ['cs2cs'] + copyinp + outfmt + in_proj.split() + ['+to'] + out_proj.split()
- p = grass.Popen(cmd, stdin = grass.PIPE)
+ p = grass.Popen(cmd, stdin = grass.PIPE, stdout = grass.PIPE)
while True:
line = inf.readline()
@@ -247,13 +247,7 @@
p.stdin.close()
p.stdin = None
-
- exitcode = p.wait()
- if exitcode != 0:
- grass.warning(_("Projection transform probably failed, please investigate"))
-
-
if not copy_input:
if include_header:
outf.write("x%sy%sz\n" % (ofs, ofs))
@@ -272,6 +266,8 @@
(inX.strip(), ofs, inY.strip(), ofs, x.strip(), \
ofs, y.strip(), ofs, z.strip()))
+ if p.returncode != 0:
+ grass.warning(_("Projection transform probably failed, please investigate"))
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list