diff options
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/pyload_app.py | 4 | ||||
-rw-r--r-- | module/web/utils.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 0131e888f..22003da43 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -307,13 +307,13 @@ def config(): t = time.localtime(data.validuntil) data.validuntil = time.strftime("%d.%m.%Y", t) - if data.options.has_key("time"): + if "time" in data.options: try: data.options["time"] = data.options["time"][0] except: data.options["time"] = "0:00-0:00" - if data.options.has_key("limitDL"): + if "limitDL" in data.options: data.options["limitdl"] = data.options["limitDL"][0] else: data.options["limitdl"] = "0" diff --git a/module/web/utils.py b/module/web/utils.py index 1455c3c01..b99736216 100644 --- a/module/web/utils.py +++ b/module/web/utils.py @@ -92,7 +92,7 @@ def login_required(perm=None): if s.get("name", None) and s.get("authenticated", False): if perm: perms = parse_permissions(s) - if not perms.has_key(perm) or not perms[perm]: + if perm not in perms or not perms[perm]: if request.headers.get('X-Requested-With') == 'XMLHttpRequest': return HTTPError(403, "Forbidden") else: |