Set a starting value for session.send_new_cookie.
This makes session.__init__ slightly more complicated but probably simplifies everything else, especially if we make the class smarter later by having it track changes itself.
This commit is contained in:
parent
9e1fa2396f
commit
5d1a8815d1
@ -22,11 +22,15 @@ import crypto
|
||||
_log = logging.getLogger(__name__)
|
||||
|
||||
class Session(dict):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.send_new_cookie = False
|
||||
dict.__init__(self, *args, **kwargs)
|
||||
|
||||
def save(self):
|
||||
self.send_new_cookie = True
|
||||
|
||||
def is_updated(self):
|
||||
return getattr(self, 'send_new_cookie')
|
||||
return self.send_new_cookie
|
||||
|
||||
def delete(self):
|
||||
self.clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user