diff options
author | synweap15 <shamdog+github@gmail.com> | 2014-07-09 13:49:12 +0200 |
---|---|---|
committer | synweap15 <shamdog+github@gmail.com> | 2014-07-09 13:49:12 +0200 |
commit | 25d2cceff065a0268a7e183449ef54edf98f1783 (patch) | |
tree | d66e402f94b1bcb4340be94d4b9fd9e818b77808 /module/plugins/accounts/RapideoPl.py | |
parent | remove blank lines and unused imports (diff) | |
download | pyload-25d2cceff065a0268a7e183449ef54edf98f1783.tar.xz |
simplify json loads, replace crypto with hashlib
Diffstat (limited to 'module/plugins/accounts/RapideoPl.py')
-rw-r--r-- | module/plugins/accounts/RapideoPl.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index 853731f26..6ace9ede0 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -1,16 +1,11 @@ # -*- coding: utf-8 -*- from datetime import datetime +import hashlib from module.plugins.Account import Account from time import mktime -import module.lib.beaker.crypto as crypto - -try: - from json import loads -except ImportError: - from simplejson import loads - +from module.common.json_layer import json_loads as loads class RapideoPl(Account): __name__ = "RapideoPl" @@ -60,7 +55,7 @@ class RapideoPl(Account): def login(self, user, data, req): self._usr = user - self._pwd = crypto.md5(data["password"]).hexdigest() + self._pwd = hashlib.md5(data["password"]).hexdigest() self._req = req try: response = loads(self.runAuthQuery()) |