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

Method set_environment_ps

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

Source from the content-addressed store, hash-verified

130
131 @staticmethod
132 def set_environment_ps(get):
133 try:
134 path = get.path.strip()
135 ps = get.ps.strip()
136 except:
137 return json_response(False, '参数错误')
138 if not path or not ps:
139 return json_response(False, '参数错误')
140 em = EnvironmentManager()
141 res = em.set_python_env_ps(path, ps)
142 if not res:
143 return json_response(True, msg="设置成功")
144 else:
145 return json_response(False, res)

Callers

nothing calls this directly

Calls 3

set_python_env_psMethod · 0.95
json_responseFunction · 0.90
EnvironmentManagerClass · 0.90

Tested by

no test coverage detected