From 612309c66821b5285e2ba6c69f10666cc16a4e10 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 22 Feb 2023 09:14:44 +0800 Subject: [PATCH] Create network.py --- appmanage/api/utils/network.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 appmanage/api/utils/network.py diff --git a/appmanage/api/utils/network.py b/appmanage/api/utils/network.py new file mode 100644 index 00000000..12d10ef6 --- /dev/null +++ b/appmanage/api/utils/network.py @@ -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 + + +