Merge pull request #23 from Justwannasleep/master

Update tools.py
This commit is contained in:
Womsxd 2021-10-12 21:25:16 +08:00 committed by GitHub
commit 62bacdd859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,14 +10,15 @@ import setting
#Log输出这里提供了自定义logging输出的机会只需要创建一个logging.ini并且写入配置文件即可自定义输出
if os.path.exists(f"{config.path}/logging.ini"):
import logging.config
logging.config.fileConfig(f"{config.path}/logging.ini")
log = logging.getLogger("AutoMihoyoBBS")
else:
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)s %(message)s',
datefmt='%Y-%m-%dT%H:%M:%S')
log = logger = logging
log = logger = logging
#md5计算
def MD5(text:str) -> str:
@ -74,4 +75,4 @@ def Get_openssl_Version() ->int:
#建议直接更新Python的版本有特殊情况请提交issues
exit(-1)
temp_List = ssl.OPENSSL_VERSION_INFO
return int(f"{str(temp_List[0])}{str(temp_List[1])}{str(temp_List[2])}")
return int(f"{str(temp_List[0])}{str(temp_List[1])}{str(temp_List[2])}")