(get)
| 109 | |
| 110 | @staticmethod |
| 111 | def set_environment_default(get): |
| 112 | try: |
| 113 | path = get.path.strip() |
| 114 | except: |
| 115 | return json_response(False, '参数错误') |
| 116 | if not path or path == "close": |
| 117 | path = "" |
| 118 | em = EnvironmentManager() |
| 119 | res = em.set_python2env(path) |
| 120 | if not path: |
| 121 | if not res: |
| 122 | return json_response(True, msg="关闭成功") |
| 123 | else: |
| 124 | return json_response(False, res) |
| 125 | else: |
| 126 | if not res: |
| 127 | return json_response(True, msg="设置成功") |
| 128 | else: |
| 129 | return json_response(False, res) |
| 130 | |
| 131 | @staticmethod |
| 132 | def set_environment_ps(get): |
nothing calls this directly
no test coverage detected