[GRASS-SVN] r59335 - grass/trunk/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 25 09:24:14 PDT 2014


Author: turek
Date: 2014-03-25 09:24:14 -0700 (Tue, 25 Mar 2014)
New Revision: 59335

Modified:
   grass/trunk/scripts/r.in.wms/wms_drv.py
Log:
r.in.wms: windows fix

Modified: grass/trunk/scripts/r.in.wms/wms_drv.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_drv.py	2014-03-25 16:22:02 UTC (rev 59334)
+++ grass/trunk/scripts/r.in.wms/wms_drv.py	2014-03-25 16:24:14 UTC (rev 59335)
@@ -105,7 +105,7 @@
                 
             # download data into temporary file
             try:
-                temp_tile_opened = open(temp_tile, 'w')
+                temp_tile_opened = open(temp_tile, 'wb')
                 temp_tile_opened.write(wms_data.read())
             except IOError, e:
                 # some servers are not happy with many subsequent requests for tiles done immediately,
@@ -134,7 +134,7 @@
             if tile_dataset_info is None:
                 # print error xml returned from server
                 try:
-                    error_xml_opened = open(temp_tile, 'r')
+                    error_xml_opened = open(temp_tile, 'rb')
                     err_str = error_xml_opened.read()     
                 except IOError, e:
                     grass.fatal(_("Unable to read data from tempfile.\n%s") % str(e))



More information about the grass-commit mailing list