From aaaf5a4cddec894aacd7400c59a9f2f5e710362f Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 22 Jul 2013 20:50:34 +0200 Subject: Fixed PEP 8 violations in Hosters (cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da) Conflicts: pyload/plugins/hoster/BasePlugin.py pyload/plugins/hoster/MultishareCz.py pyload/plugins/hoster/NetloadIn.py pyload/plugins/hoster/PremiumizeMe.py pyload/plugins/hoster/RapidshareCom.py --- pyload/plugins/hoster/MegaNz.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pyload/plugins/hoster/MegaNz.py') diff --git a/pyload/plugins/hoster/MegaNz.py b/pyload/plugins/hoster/MegaNz.py index e5be4eeb7..827d79328 100644 --- a/pyload/plugins/hoster/MegaNz.py +++ b/pyload/plugins/hoster/MegaNz.py @@ -15,6 +15,7 @@ from module.plugins.Hoster import Hoster #def getInfo(urls): # pass + class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" @@ -64,7 +65,7 @@ class MegaNz(Hoster): n = key[16:24] # convert counter to long and shift bytes - ctr = Counter.new(128, initial_value=long(n.encode("hex"),16) << 64) + ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) cipher = AES.new(self.getCipherKey(key), AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") @@ -73,10 +74,11 @@ class MegaNz(Hoster): # TODO: calculate CBC-MAC for checksum - size = 2 ** 15 # buffer size, 32k + size = 2 ** 15 # buffer size, 32k while True: buf = f.read(size) - if not buf: break + if not buf: + break df.write(cipher.decrypt(buf)) -- cgit v1.2.3