MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / add_environment

Method add_environment

mod/project/python/environmentMod.py:83–92  ·  view source on GitHub ↗
(get)

Source from the content-addressed store, hash-verified

81
82 @staticmethod
83 def add_environment(get):
84 try:
85 add_type = get.add_type.strip()
86 path = get.path.strip()
87 except:
88 return json_response(False, '参数错误')
89 res = EnvironmentManager().add_python_env(add_type, path)
90 if isinstance(res, str):
91 return json_response(False, res)
92 return json_response(True, msg="添加成功")
93
94 @staticmethod
95 def remove_environment(get):

Callers

nothing calls this directly

Calls 3

json_responseFunction · 0.90
EnvironmentManagerClass · 0.90
add_python_envMethod · 0.80

Tested by

no test coverage detected