[Pywps-commits] r497 - in trunk/pywps: . Parser processes
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 17 14:30:14 CEST 2008
Author: jachym
Date: 2008-07-17 14:30:13 +0200 (Thu, 17 Jul 2008)
New Revision: 497
Modified:
trunk/pywps/InAndOutputs.py
trunk/pywps/Parser/Execute.py
trunk/pywps/Parser/Get.py
trunk/pywps/processes/__init__.py
Log:
bugfix when Max file size exeded, predicted ComplexReference type, if HTTP GET requested, but type of the input not set
Modified: trunk/pywps/InAndOutputs.py
===================================================================
--- trunk/pywps/InAndOutputs.py 2008-07-17 05:48:11 UTC (rev 496)
+++ trunk/pywps/InAndOutputs.py 2008-07-17 12:30:13 UTC (rev 497)
@@ -121,7 +121,6 @@
self.maxFileSize = None
-
if type(formats) == types.StringType:
formats = [{"mimeType":formats,"encoding":None,"schema":None}]
elif type(formats) == types.DictType:
@@ -139,11 +138,16 @@
def setValue(self, input):
+ # if HTTP GET was performed, the type does not have to be set
+ if not input.has_key("type") and\
+ input["value"].find("http://") == 0:
+ input["type"] = "ComplexValueReference"
+
+ # download data
if input["type"] == "ComplexValueReference":
self.downloadData(input["value"])
else:
self.storeData(input["value"])
-
return
def storeData(self,data):
@@ -184,7 +188,9 @@
# TOO BIG! STOP THIS
if size > self.maxFileSize:
- self.onProblem("FileSizeExceeded")
+ self.onProblem("FileSizeExceeded","Maximum file size is "+
+ str(self.maxFileSize/1024/1024)+" MB for input "+
+ url)
fout.close()
Modified: trunk/pywps/Parser/Execute.py
===================================================================
--- trunk/pywps/Parser/Execute.py 2008-07-17 05:48:11 UTC (rev 496)
+++ trunk/pywps/Parser/Execute.py 2008-07-17 12:30:13 UTC (rev 497)
@@ -542,5 +542,4 @@
attributeKey, attributeValue = attribute.split("=")
parsedDataInputs[key][attributeKey] =\
attributeValue
-
return parsedDataInputs
Modified: trunk/pywps/Parser/Get.py
===================================================================
--- trunk/pywps/Parser/Get.py 2008-07-17 05:48:11 UTC (rev 496)
+++ trunk/pywps/Parser/Get.py 2008-07-17 12:30:13 UTC (rev 497)
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import types,sys
+import types
from string import split
from pywps.Parser.Parser import Parser
@@ -67,7 +67,7 @@
for key in self.unparsedInputs.keys():
value = self.unparsedInputs[key]
- value = self.controll(value)
+ value = self.control(value)
# check size
if self.wps.maxInputLength > 0 and\
Modified: trunk/pywps/processes/__init__.py
===================================================================
--- trunk/pywps/processes/__init__.py 2008-07-17 05:48:11 UTC (rev 496)
+++ trunk/pywps/processes/__init__.py 2008-07-17 12:30:13 UTC (rev 497)
@@ -1,2 +1,2 @@
-__all__ = ["buffer","los"]
+__all__ = ["buffer","harmoniser"]
More information about the Pywps-commits
mailing list