websoft9/appmanage/api/utils/network.py
2023-02-22 09:14:57 +08:00

18 lines
406 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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