From 4e8fd1bfb7f77a7eba1880d61a60a70481a6341f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 18:02:51 +0200 Subject: Fix dict generators for python 2.5 --- pyload/Database/Storage.py | 2 +- pyload/Database/User.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pyload/Database') diff --git a/pyload/Database/Storage.py b/pyload/Database/Storage.py index a19f67606..1d6922a89 100644 --- a/pyload/Database/Storage.py +++ b/pyload/Database/Storage.py @@ -25,7 +25,7 @@ class StorageMethods(object): return row[0] else: db.c.execute("SELECT key, value FROM storage WHERE identifier=?", (identifier,)) - return {row[0]: row[1] for row in db.c} + return dict((row[0], row[1]) for row in db.c) @style.queue diff --git a/pyload/Database/User.py b/pyload/Database/User.py index a91e16cc6..b895a4e12 100644 --- a/pyload/Database/User.py +++ b/pyload/Database/User.py @@ -82,7 +82,7 @@ class UserMethods(object): @style.queue def getAllUserData(db): db.c.execute("SELECT name, permission, role, template, email FROM users") - return {r[0]: {"permission": r[1], "role": r[2], "template": r[3], "email": r[4]} for r in db.c} + return dict(r[0], {"permission": r[1], "role": r[2], "template": r[3], "email": r[4]}) for r in db.c) @style.queue -- cgit v1.2.3