diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-01 23:53:07 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-01 23:53:07 +0100 |
commit | 004a80bfaad38f9400e8aebcb8f980353a232295 (patch) | |
tree | 1e786d2d14a3040767aac237982544b74a9567cb /pyload/webui/app/api.py | |
parent | Fix previous merge (diff) | |
download | pyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz |
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/webui/app/api.py')
-rw-r--r-- | pyload/webui/app/api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyload/webui/app/api.py b/pyload/webui/app/api.py index 286061c2a..9726902fb 100644 --- a/pyload/webui/app/api.py +++ b/pyload/webui/app/api.py @@ -60,7 +60,7 @@ def callApi(func, *args, **kwargs): return HTTPError(404, json.dumps("Not Found")) result = getattr(PYLOAD, func)(*[literal_eval(x) for x in args], - **dict([(x, literal_eval(y)) for x, y in kwargs.iteritems()])) + **dict((x, literal_eval(y)) for x, y in kwargs.iteritems())) # null is invalid json response if result is None: result = True @@ -88,7 +88,7 @@ def login(): try: sid = s._headers["cookie_out"].split("=")[1].split(";")[0] return json.dumps(sid) - except: + except Exception: return json.dumps(True) |