diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-04-11 18:11:28 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-04-11 18:11:28 +0200 |
commit | de0092530a5825433e7566064bdbd18b2e802b0a (patch) | |
tree | 8f9b20d0d7bc39fbd11f3028cfcc34be279df2ef | |
parent | UploadedTo: getID uses the __pattern__ regex to avoid duplication. (diff) | |
parent | revert correct rsrtrip() (diff) | |
download | pyload-de0092530a5825433e7566064bdbd18b2e802b0a.tar.xz |
Merge pull request #75 from gonzalosr/patch-4
Fixed incorrect use of rstrip()
-rw-r--r-- | module/plugins/hoster/MegaNz.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hoster/MegaNz.py b/module/plugins/hoster/MegaNz.py index a28ddca9d..e5be4eeb7 100644 --- a/module/plugins/hoster/MegaNz.py +++ b/module/plugins/hoster/MegaNz.py @@ -19,7 +19,7 @@ class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" __pattern__ = r"https?://([a-z0-9]+\.)?mega\.co\.nz/#!([a-zA-Z0-9!_\-]+)" - __version__ = "0.11" + __version__ = "0.12" __description__ = """mega.co.nz hoster plugin""" __author_name__ = ("RaNaN", ) __author_mail__ = ("ranan@pyload.org", ) @@ -34,7 +34,7 @@ class MegaNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ a = array("I", key) - key_array = array("I", [a[0] ^ a[4], a[1] ^a[5], a[2] ^ a[6], a[3] ^a[7]]) + key_array = array("I", [a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7]]) return key_array def callApi(self, **kwargs): @@ -69,7 +69,7 @@ class MegaNz(Hoster): self.pyfile.setStatus("decrypting") f = open(self.lastDownload, "rb") - df = open(self.lastDownload.rstrip(self.FILE_SUFFIX), "wb") + df = open(self.lastDownload.rsplit(self.FILE_SUFFIX)[0], "wb") # TODO: calculate CBC-MAC for checksum |