This commit is contained in:
Jing Ling
2020-08-08 18:00:36 +08:00
parent 69ce692ff1
commit 4f462fcd60
76 changed files with 177 additions and 207 deletions
-3
View File
@@ -1,6 +1,3 @@
#!/usr/bin/env python3
# coding=utf-8
"""
SQLite database initialization and operation
"""
-2
View File
@@ -1,4 +1,3 @@
# coding=utf-8
"""
Module base class
"""
@@ -11,7 +10,6 @@ import requests
from config.log import logger
from config import settings
from common import utils
from common.domain import Domain
from common.database import Database
lock = threading.Lock()
-2
View File
@@ -16,8 +16,6 @@ def get_limit_conn():
limit_open_conn = settings.limit_open_conn
if limit_open_conn is None: # 默认情况
limit_open_conn = utils.get_semaphore()
elif not isinstance(limit_open_conn, int): # 如果传入不是数字的情况
limit_open_conn = utils.get_semaphore()
return limit_open_conn
-1
View File
@@ -4,7 +4,6 @@ import json
from config.log import logger
from config import settings
from common import utils
from common.database import Database
from common.ipasn import IPAsnInfo
from common.ipgeo import IpGeoInfo
from common.ipreg import IpRegInfo
-3
View File
@@ -1,7 +1,4 @@
import re
from config import settings
from config.log import logger
from common.module import Module
+4 -5
View File
@@ -572,11 +572,10 @@ def check_pre():
if version < '3.6':
logger.log('FATAL', 'OneForAll requires Python 3.6 or higher')
exit(1)
if system == 'Windows' and implementation == 'CPython':
if version < '3.8':
logger.log('FATAL', 'OneForAll requires Python 3.8 '
'or higher when running on Windows')
exit(1)
if system == 'Windows' and implementation == 'CPython' and version < '3.8':
logger.log('FATAL', 'OneForAll requires Python 3.8 '
'or higher when running on Windows')
exit(1)
if system in {"Linux", "Darwin"}:
try:
import uvloop