[Pywps-commits] r869 - trunk/pywps/Parser

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Nov 9 08:42:52 CET 2009


Author: jachym
Date: 2009-11-09 08:42:51 +0100 (Mon, 09 Nov 2009)
New Revision: 869

Modified:
   trunk/pywps/Parser/Execute.py
Log:
bugfix in input XML responseform parser

Modified: trunk/pywps/Parser/Execute.py
===================================================================
--- trunk/pywps/Parser/Execute.py	2009-11-08 12:08:37 UTC (rev 868)
+++ trunk/pywps/Parser/Execute.py	2009-11-09 07:42:51 UTC (rev 869)
@@ -99,22 +99,22 @@
             self.wps.inputs["responseform"].has_key("responsedocument")):
             raise self.wps.exceptions.InvalidParameterValue(
                 "Either responseDocument or rawDataOutput should be specified, but not both")
-        else:
-            self.wps.inputs["responseform"]["responsedocument"] = {}
-            self.wps.inputs["responseform"]["rawdataoutput"] = {}
+        if not self.wps.inputs["responseform"].has_key("rawdataoutput"):
+               self.wps.inputs["responseform"]["rawdataoutput"] = {}
+        if not self.wps.inputs["responseform"].has_key("responsedocument"):
+               self.wps.inputs["responseform"]["responsedocument"] = {}
+        return
 
     def parseResponseForm(self,responseFormNode):
         """ Parse requested response form node """
 
         form = {}
-        form["responsedocument"] = {}
-        form["rawdataoutput"] = {}
 
         # ResponseDocument
         try:
+            form["responsedocument"] = {}
             responseDocumentNode = responseFormNode.getElementsByTagNameNS(
                                     self.nameSpace, "ResponseDocument")[0]
-            form["responsedocument"] = {}
 
             # store
             store = False



More information about the Pywps-commits mailing list