Fix WPS execute outputs parsing assuming string #623
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue / Discussion
When parsing the XML of the WPS execute request (in
parse_post_execute
):pywps/pywps/app/WPSRequest.py
Line 280 in 88d2d4d
The outputs that do not provide a
mimetype
explicitly are defaulted toNone
:pywps/pywps/app/WPSRequest.py
Line 590 in 88d2d4d
When those output definitions eventually reach the following call, the field
mimetype
exists and isNone
, making both themimetype != ''
compare and'MimeType ' + mimetype + ' not valid'
fail (raises cannot concatenate non-string).pywps/pywps/app/Process.py
Lines 453 to 479 in cd71ee7
This PR simply sets it to the default
''
Additional Information
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)