Fix the upgrade script when password is less than 6 characters

This commit is contained in:
obdev
2024-06-20 13:45:21 +00:00
committed by ob-robot
parent 1169ba55de
commit 92546c111b
6 changed files with 36 additions and 72 deletions

View File

@ -626,14 +626,11 @@
#class PasswordMaskingFormatter(logging.Formatter):
# def format(self, record):
# s = super(PasswordMaskingFormatter, self).format(record)
# return re.sub(r'password="(?:[^"\\]|\\.)+"', 'password="******"', s)
# return re.sub(r'password="(?:[^"\\]|\\.)*"', 'password="******"', s)
#
#def config_logging_module(log_filenamme):
# logging.basicConfig(level=logging.INFO,\
# format='[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s',\
# datefmt='%Y-%m-%d %H:%M:%S',\
# filename=log_filenamme,\
# filemode='w')
# logger = logging.getLogger('')
# logger.setLevel(logging.INFO)
# # 定义日志打印格式
# formatter = PasswordMaskingFormatter('[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s', '%Y-%m-%d %H:%M:%S')
# #######################################
@ -798,14 +795,11 @@
#class PasswordMaskingFormatter(logging.Formatter):
# def format(self, record):
# s = super(PasswordMaskingFormatter, self).format(record)
# return re.sub(r'password="(?:[^"\\]|\\.)+"', 'password="******"', s)
# return re.sub(r'password="(?:[^"\\]|\\.)*"', 'password="******"', s)
#
#def config_logging_module(log_filenamme):
# logging.basicConfig(level=logging.INFO,\
# format='[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s',\
# datefmt='%Y-%m-%d %H:%M:%S',\
# filename=log_filenamme,\
# filemode='w')
# logger = logging.getLogger('')
# logger.setLevel(logging.INFO)
# # 定义日志打印格式
# formatter = PasswordMaskingFormatter('[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s', '%Y-%m-%d %H:%M:%S')
# #######################################
@ -1677,7 +1671,7 @@
#class PasswordMaskingFormatter(logging.Formatter):
# def format(self, record):
# s = super(PasswordMaskingFormatter, self).format(record)
# return re.sub(r'password="(?:[^"\\]|\\.)+"', 'password="******"', s)
# return re.sub(r'password="(?:[^"\\]|\\.)*"', 'password="******"', s)
#
##### --------------start : my_error.py --------------
#class MyError(Exception):
@ -1942,11 +1936,8 @@
#
##### --------------start : do_upgrade_pre.py--------------
#def config_logging_module(log_filenamme):
# logging.basicConfig(level=logging.INFO,\
# format='[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s',\
# datefmt='%Y-%m-%d %H:%M:%S',\
# filename=log_filenamme,\
# filemode='w')
# logger = logging.getLogger('')
# logger.setLevel(logging.INFO)
# # 定义日志打印格式
# formatter = PasswordMaskingFormatter('[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s', '%Y-%m-%d %H:%M:%S')
# #######################################
@ -2492,7 +2483,7 @@
#class PasswordMaskingFormatter(logging.Formatter):
# def format(self, record):
# s = super(PasswordMaskingFormatter, self).format(record)
# return re.sub(r'password="(?:[^"\\]|\\.)+"', 'password="******"', s)
# return re.sub(r'password="(?:[^"\\]|\\.)*"', 'password="******"', s)
#
##### --------------start : my_error.py --------------
#class MyError(Exception):
@ -2739,11 +2730,8 @@
#
##### --------------start : do_upgrade_pre.py--------------
#def config_logging_module(log_filenamme):
# logging.basicConfig(level=logging.INFO,\
# format='[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s',\
# datefmt='%Y-%m-%d %H:%M:%S',\
# filename=log_filenamme,\
# filemode='w')
# logger = logging.getLogger('')
# logger.setLevel(logging.INFO)
# # 定义日志打印格式
# formatter = PasswordMaskingFormatter('[%(asctime)s] %(levelname)s %(filename)s:%(lineno)d %(message)s', '%Y-%m-%d %H:%M:%S')
# #######################################