Skip to content

Commit

Permalink
[#2494] Make PEP-8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oderbolz committed Jul 1, 2015
1 parent 53ed142 commit b27e31e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ckan/controllers/util.py
Expand Up @@ -34,12 +34,18 @@ def set_timezone_offset(self, offset):
if not (60*12 >= offset >= -(60*14)):
raise ValueError
except ValueError:
base.abort(400, _('Not a valid UTC offset value, must be between 720 (UTC-12) and -840 (UTC+14)'))
base.abort(
400,
_(
'Not a valid UTC offset value, must be '
'between 720 (UTC-12) and -840 (UTC+14)'
)
)

session = request.environ['beaker.session']
session['utc_offset_mins'] = offset
session.save()
return h.json.dumps({'utc_offset_mins': session.get('utc_offset_mins', 'No offset set')})
return h.json.dumps({'utc_offset_mins': offset})

def markup(self):
''' Render all html elements out onto a single page.
Expand Down

0 comments on commit b27e31e

Please sign in to comment.