joey: thuban/Extensions/wms capabilities.py,1.7,1.8
cvs@intevation.de
cvs at intevation.de
Thu Apr 1 16:41:37 CEST 2004
Author: joey
Update of /thubanrepository/thuban/Extensions/wms
In directory doto:/tmp/cvs-serv23178
Modified Files:
capabilities.py
Log Message:
Added proper error handling when the GetCapabilities request failed,
so that the surrounding program can act accordingly.
Index: capabilities.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/capabilities.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- capabilities.py 1 Apr 2004 14:39:39 -0000 1.7
+++ capabilities.py 1 Apr 2004 14:41:35 -0000 1.8
@@ -117,7 +117,14 @@
def fetchCapabilities(self, resource):
- """Fetches the WMS capabilities from an Internet resource"""
+ """
+ Fetches the WMS capabilities from an Internet resource
+
+ WMS Protocol version 1.1 is tried first, then 1.0. The
+ protocol version used can be queried by the getVersion()
+ method for later use. If both tries fail, errorMsg will be
+ set accordingly, which can be fetched with getErrorMsg().
+ """
self.wmsVersion = "1.1"
self.capabilities = self.getCapabilities(resource, self.wmsVersion)
@@ -126,6 +133,10 @@
self.capabilities = self.getCapabilities(resource, self.wmsVersion)
if not self.capabilities:
self.wmsVersion = None
+ self.errorMsg \
+ = _("Resource '%s' "
+ + "does support neither WMS version 1.1 nor 1.0") \
+ % resource
if self.capabilities:
self.grok(self.capabilities)
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)