From dfd5cb44138494b803f66559747cacc1260b5595 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:15:03 +0200 Subject: simplify json loads, replace crypto with hashlib --- module/plugins/accounts/NoPremiumPl.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'module/plugins/accounts/NoPremiumPl.py') diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index 7b4140169..0f3b5286f 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -1,16 +1,12 @@ # -*- 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, dumps -except ImportError: - from module.common.json_layer import json_loads as loads - from module.common.json_layer import json_dumps as dumps +from module.common.json_layer import json_loads as loads class NoPremiumPl(Account): @@ -61,7 +57,7 @@ class NoPremiumPl(Account): def login(self, user, data, req): self._usr = user - self._pwd = crypto.sha1(crypto.md5(data["password"]).hexdigest()).hexdigest() + self._pwd = hashlib.sha1(hashlib.md5(data["password"]).hexdigest()).hexdigest() self._req = req try: -- cgit v1.2.3