From c039d5822c4c53661813b6fd8e2252a3b633532e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 27 Feb 2015 04:39:45 +0100 Subject: [container] Code cosmetics --- module/plugins/container/DLC.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/container/DLC.py') diff --git a/module/plugins/container/DLC.py b/module/plugins/container/DLC.py index d1c34ef50..ff2f0104a 100644 --- a/module/plugins/container/DLC.py +++ b/module/plugins/container/DLC.py @@ -33,8 +33,8 @@ class DLC(Container): def decrypt(self, pyfile): - file = fs_encode(pyfile.url.strip()) - with open(file) as dlc: + fs_filename = fs_encode(pyfile.url.strip()) + with open(fs_filename) as dlc: data = dlc.read().strip() data += '=' * (-len(data) % 4) @@ -52,8 +52,8 @@ class DLC(Container): key = iv = AES.new(self.KEY, AES.MODE_CBC, self.IV).decrypt(rc) self.data = AES.new(key, AES.MODE_CBC, iv).decrypt(dlc_data).decode('base64') - self.packages = [(entry[0] if entry[0] else pyfile.name, entry[1], entry[0] if entry[0] else pyfile.name) \ - for entry in self.getPackages()] + self.packages = [(name or pyfile.name, links, name or pyfile.name) \ + for name, links in self.getPackages()] def getPackages(self): -- cgit v1.2.3