aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/cgiData.py
diff options
context:
space:
mode:
authorSam Ockman2012-06-05 00:24:44 -0400
committerSam Ockman2012-06-05 00:24:44 -0400
commit8ac39ead1014953c634e85d0ce340497ecfe2934 (patch)
treef69bef8650f64bdfa5093c39fe7dc6a8b5ffac82 /wqflask/base/cgiData.py
parent8abd879e71f492ce61e0b8d3eab53fcb43c34681 (diff)
downloadgenenetwork2-8ac39ead1014953c634e85d0ce340497ecfe2934.tar.gz
Ran reindent.py recursively on wqflask directory
Diffstat (limited to 'wqflask/base/cgiData.py')
-rwxr-xr-xwqflask/base/cgiData.py60
1 files changed, 28 insertions, 32 deletions
diff --git a/wqflask/base/cgiData.py b/wqflask/base/cgiData.py
index 57416060..155b3ec3 100755
--- a/wqflask/base/cgiData.py
+++ b/wqflask/base/cgiData.py
@@ -30,41 +30,37 @@
#########################################
class cgiData(dict):
- '''convert Field storage object to Dict object
- Filed storage object cannot be properly dumped
- '''
+ '''convert Field storage object to Dict object
+ Filed storage object cannot be properly dumped
+ '''
- def __init__(self, field_storage=None):
+ def __init__(self, field_storage=None):
- if not field_storage:
- field_storage={}
-
- for key in field_storage.keys():
- temp = field_storage.getlist(key)
- if len(temp) > 1:
- temp = map(self.toValue, temp)
- elif len(temp) == 1:
- temp = self.toValue(temp[0])
- else:
- temp = None
- self[key]= temp
-
- def toValue(self, obj):
- '''fieldstorge returns different type of objects, \
- need to convert to string or None'''
- try:
- return obj.value
- except:
- return ""
-
- def getvalue(self, k, default= None):
- try:
- return self[k]
- except:
- return default
-
- getfirst = getvalue
+ if not field_storage:
+ field_storage={}
+ for key in field_storage.keys():
+ temp = field_storage.getlist(key)
+ if len(temp) > 1:
+ temp = map(self.toValue, temp)
+ elif len(temp) == 1:
+ temp = self.toValue(temp[0])
+ else:
+ temp = None
+ self[key]= temp
+ def toValue(self, obj):
+ '''fieldstorge returns different type of objects, \
+ need to convert to string or None'''
+ try:
+ return obj.value
+ except:
+ return ""
+ def getvalue(self, k, default= None):
+ try:
+ return self[k]
+ except:
+ return default
+ getfirst = getvalue