mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
实现配置文件插拔式设计
This commit is contained in:
+2
-2
@@ -29,8 +29,8 @@ def get_ports(port):
|
||||
elif isinstance(port, int):
|
||||
if 0 <= port <= 65535:
|
||||
ports = {port}
|
||||
elif port in {'default', 'small', 'large'}:
|
||||
logger.log('DEBUG', '{port} port range')
|
||||
elif port in {'small', 'medium', 'large'}:
|
||||
logger.log('DEBUG', f'{port} port range')
|
||||
ports = setting.ports.get(port)
|
||||
if not ports: # 意外情况
|
||||
logger.log('ERROR', 'The specified request port range is incorrect')
|
||||
|
||||
Reference in New Issue
Block a user