Commit d759e57c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Apply 2to3 converter to controllers.

parent daae7dac
# -*- coding: utf-8 -*-
""" Controllers
"""
......@@ -12,7 +11,7 @@ def index():
"""
# login procedure is active
if session.auth:
roles = session.auth.user_groups.values()
roles = list(session.auth.user_groups.values())
if roles:
session.role = roles[0]
......
# -*- coding: utf-8 -*-
"""plugin_event controllers
"""
import json
import traceback
import urllib
import urllib.parse
from datetime import datetime
......@@ -72,7 +71,7 @@ def metric2d():
if graph.ax is not None:
img = graph.to_svg()
img = urllib.quote(img)
img = urllib.parse.quote(img)
response.view = "plugin_event/grid_and_graph.html"
return dict(cfg_store=store, grid=grid, img=img, title=title)
......@@ -145,7 +144,7 @@ def userModelConsistency():
if update_keys:
ok = False
for k, v in update_keys.iteritems():
for k, v in update_keys.items():
if oldkey == v:
update_keys[k] = newkey
ok = True
......@@ -212,7 +211,7 @@ def userModelConsistency():
data[key] = (rd[key] if key in rd else model[key]["value"])
# modify key name
for oldkey, newkey in update_keys.iteritems():
for oldkey, newkey in update_keys.items():
if oldkey in rd:
data[newkey] = rd[oldkey]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment