Changeset 858

Show
Ignore:
Timestamp:
12/07/11 15:42:28 (18 months ago)
Author:
jjr8
Message:

Fixed #505: Sample Rasters tools fail with ArcGISError: Failed to set the ScratchWorkspace? property of ArcGIS Geoprocessor object ... to None.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/ArcGIS.py

    r781 r858  
    14381438##            return int(value) 
    14391439 
    1440         # When the geoprocessor is obtained through arcgisscripting.create(), it 
    1441         # does not like to receive None, but empty strings seem to work. 
    1442  
    1443         if not geoprocessorIsCOMObject and isinstance(value, types.NoneType): 
     1440        # Under some scenarios, the geoprocessor does not like to set 
     1441        # attributes to None (see, for example, Trac Ticket #505). But 
     1442        # it seems to always allow setting attributes to an empty 
     1443        # string in place of None. 
     1444 
     1445        if isinstance(value, types.NoneType): 
    14441446            return '' 
    14451447