From 1e2e91091664c2fca6a187804b2041eab757dbe3 Mon Sep 17 00:00:00 2001 From: fedeG Date: Mon, 20 Apr 2015 22:01:18 +0200 Subject: PEP-8, Python Zen, refactor and reduce code (part 15 in master module/webui/app) Conflicts: pyload/webui/app/api.py pyload/webui/app/cnl.py pyload/webui/app/json.py pyload/webui/app/pyloadweb.py pyload/webui/app/utils.py --- pyload/webui/app/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pyload/webui/app/utils.py') diff --git a/pyload/webui/app/utils.py b/pyload/webui/app/utils.py index 8957f061e..2753b7feb 100644 --- a/pyload/webui/app/utils.py +++ b/pyload/webui/app/utils.py @@ -115,10 +115,7 @@ def login_required(perm=None): def toDict(obj): - ret = {} - for att in obj.__slots__: - ret[att] = getattr(obj, att) - return ret + return {att: getattr(obj, att) for att in obj.__slots__} class CherryPyWSGI(ServerAdapter): -- cgit v1.2.3