[OWSLib-devel] bug in SOS 1.0.0 get_observation?
Joe Futrelle
jfutrelle at whoi.edu
Fri Nov 1 11:41:18 PDT 2013
I hope I'm posting this to the right list.
Reading the owslib/swe/observation/sos100.py it appears that
get_observation only returns a response in exception handlers. When all
those fall through it returns None, which I don't think is correct.
This is in release version 0.8.2, here's the offending section of the code:
response = openURL(base_url, data, method,
username=self.username, password=self.password).read()
try:
tr = etree.fromstring(response)
if tr.tag == nspath_eval("ows:ExceptionReport", namespaces):
raise ows.ExceptionReport(tr)
except ows.ExceptionReport:
raise
except BaseException:
return response
I think the fix is just to add a return clause immediately after the
except clauses?
Apologies if this is me not understanding the API.
Or if this has already been patched.
And the other usual disclaimers.
--
Joe Futrelle
Woods Hole Oceanographic Institution
jfutrelle at whoi.edu
More information about the OWSLib-devel
mailing list