changepassword.py 360 B

12345678910
  1. from .flightDB import flightDB
  2. from unitls.LogerinTxt import app_logger
  3. def changepassword(loginTabledb:flightDB,user,old,new):
  4. try:
  5. newdic={"密码":"'%s'"%new}
  6. loginTabledb.upDateItem("logintable",newdic,"登录名='%s' and 密码='%s'"%(user,old))
  7. loginTabledb.close()
  8. except Exception as e:
  9. app_logger.log_error(e)