mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 01:50:19 +08:00
Create network.py
This commit is contained in:
parent
2ec6e25756
commit
612309c668
18
appmanage/api/utils/network.py
Normal file
18
appmanage/api/utils/network.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import os, io, sys, platform, shutil, time, json, datetime
|
||||||
|
|
||||||
|
# 根据依赖文件提供的port,判断是否启动
|
||||||
|
def get_start_port(port):
|
||||||
|
print("目前检查"+port+"是否被占用")
|
||||||
|
|
||||||
|
if 端口被占用:
|
||||||
|
port=port+1
|
||||||
|
继续判断端口是否被占用只要没有被占用
|
||||||
|
use_port=xxxport
|
||||||
|
else:
|
||||||
|
use_port=xxxport
|
||||||
|
|
||||||
|
|
||||||
|
return use_port
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user