[OWSLib-devel] SOS 2.0

Tom Kralidis tomkralidis at gmail.com
Thu Dec 4 04:44:47 PST 2014




On Thu, 4 Dec 2014, Andrew Watkins wrote:

> Date: Thu, 4 Dec 2014 00:03:16 +0000
> From: Andrew Watkins <Andrew.Watkins at niwa.co.nz>
> To: "owslib-devel at lists.osgeo.org" <owslib-devel at lists.osgeo.org>
> Subject: [OWSLib-devel] SOS 2.0
> 
> Hi Folks
> I’m new to the list.  So please forgive possibly naive questions.
>
> Looking at sos200.py we have
>    def __getitem__(self,id):
>        ''' check contents dictionary to allow dict like access to service observational offerings'''
>        if name in self.__getattribute__('contents').keys():
>            return self.__getattribute__('contents')[id]
>        else:
>            raise KeyError, "No Observational Offering with id: %s" % id
>
>
> Is the use of ‘name’ here correct?  Should it be ‘id’ ?
>
> If you run it then you get
>
> NameError: global name 'name' is not defined

Hi Andrew:

Looks like a bug.  Feel free to issue a pull request/test case or GitHub issue.

..Tom


More information about the OWSLib-devel mailing list