aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/myCookie.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/myCookie.py')
-rwxr-xr-xwqflask/base/myCookie.py38
1 files changed, 17 insertions, 21 deletions
diff --git a/wqflask/base/myCookie.py b/wqflask/base/myCookie.py
index db5320df..add7e6ea 100755
--- a/wqflask/base/myCookie.py
+++ b/wqflask/base/myCookie.py
@@ -25,31 +25,27 @@
# Last updated by GeneNetwork Core Team 2010/10/20
#########################################
-## python cookie and mod python cookie are
+## python cookie and mod python cookie are
## not compatible
#########################################
class myCookie(dict):
- 'define my own cookie'
-
- def __init__(self, name="", value="", expire = None, path="/"):
- self['name']= name
- self['value']= value
- self['expire']= expire
- self['path']= path
-
- def __getattr__(self, key):
- if key in self.keys():
- return self[key]
- else:
- return None
-
- def __nonzero__ (self):
- if self['name']:
- return 1
- else:
- return 0
-
+ 'define my own cookie'
+ def __init__(self, name="", value="", expire = None, path="/"):
+ self['name']= name
+ self['value']= value
+ self['expire']= expire
+ self['path']= path
+ def __getattr__(self, key):
+ if key in self.keys():
+ return self[key]
+ else:
+ return None
+ def __nonzero__ (self):
+ if self['name']:
+ return 1
+ else:
+ return 0