OWSLib
OWSLib copied to clipboard
strict assertion styles
Hi, thanks for this amazing tool! I'm using the GetFeatureInfo to retrieve the info for a layer but as the different styles provide different information, I need to pass the styles args. In the wms11.py there is at line 167:
if styles:
assert len(styles) == len(layers)
request['styles'] = ','.join(styles)
else:
request['styles'] = ''
Having different lengths, the system return an error.
For my needs I modified the wms111.py as follow:
if styles and len(styles) > 0:
request['styles'] = styles
else:
request['styles'] = ''
The and len(styles) > 0 is not needed, an empty array is considered as False...
The
and len(styles) > 0is not needed, an empty array is considered asFalse...
Thanks, you are right.