pylint:fixed 1

Bug393-TanYanMei
倪玲丽 2023-06-04 01:50:13 +08:00
parent 9a95842b7c
commit 782783040a
3 changed files with 4 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import hashlib
import string
from datetime import datetime, timedelta
from model.user import get_user_by_username, insert_user, update_password_by_username
def md5(s):
'''
MD5摘要
@ -11,7 +11,7 @@ def md5(s):
h = hashlib.md5(s.encode(encoding='utf-8'))
return h.hexdigest()
from app.model.user import get_user_by_username, insert_user, update_password_by_username
path_prefix = '/var/www/wordfreq/wordfreq/'
path_prefix = './' # comment this line in deployment
@ -22,7 +22,6 @@ def verify_pass(newpass,oldpass):
'''
if newpass==oldpass:
return True
return False
def verify_user(username, password):

View File

@ -13,7 +13,7 @@ class Sqlite3Template:
def __init__(self, db_fname):
self.db_fname = db_fname
def connect(self):
def connect(self, db_fname):
self.conn = sqlite3.connect(self.db_fname)
def instructions(self, query_statement):

View File

@ -38,8 +38,7 @@ def merge_frequency(lst1, lst2):
def load_record(pickle_fname):
with open(pickle_fname, 'rb') as f:
pickle.load(f)
f.close()
d=pickle.load(f)
return d