Skip to content

Commit

Permalink
Fixes on merged pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Sep 17, 2016
1 parent 481bbff commit fc6b79c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions beaker/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ def coerce_session_params(params):
if cookie_expires and isinstance(cookie_expires, int) and \
not isinstance(cookie_expires, bool):
opts['cookie_expires'] = timedelta(seconds=cookie_expires)
if opts['timeout'] is not None and not opts['save_accessed_time']:

if opts.get('timeout') is not None and not opts.get('save_accessed_time', True):
raise Exception("save_accessed_time must be true to use timeout")

return opts


Expand Down Expand Up @@ -462,7 +464,7 @@ def dumps(self, data):
return zlib.compress(json.dumps(data).encode('utf-8'))


def serialize(data, serializer):
def serialize(data, method):
if method == 'json':
serializer = JsonSerializer()
else:
Expand Down

0 comments on commit fc6b79c

Please sign in to comment.