geopython/OWSLib — pull request #173 by eykamp (2014-08-12 14:12:11+00:00)
Title: Reimplement AnyValue fix, including test changes

NOTE: Test failure does not appear related to this commit

This improves WPS handling of AnyValue, and fixes potential crashes.

1) AnyValue should not be added to the list of allowed values, as it is itself not an allowed value, but rather a signifier that any value is permitted. To better distinguish these cases, I added an anyValue flag, which defaults to False, and gets set to True if the AnyValue tag is encountered. (This is also how OpenLayers works, so the general semantics will be familiar to anyone working with that lib.)

2) If AnyValue is present and the datatype is numeric, then the current code will crash trying to convert AnyValue to a number (which cannot be done). This patch prevents that crash.

3) Includes fixes to tests to reflect these changes

Fixes the following crash:

from owslib.wps import WebProcessingService
wps = WebProcessingService("http://geoprocessing.demo.52north.org:8081/wps/WebProcessingService", version="1.0.0")
wps.describeprocess("r.los")