(cls)
| 534 | |
| 535 | @classmethod |
| 536 | def profile_env_bin(cls) -> Optional[str]: |
| 537 | if not os.path.isfile("/etc/profile"): |
| 538 | return None |
| 539 | data = public.readFile("/etc/profile") |
| 540 | for line in data.split("\n"): |
| 541 | if line.find("source /www/server/panel/data/bt_etc_pyenv.sh"): |
| 542 | break |
| 543 | else: |
| 544 | return None |
| 545 | |
| 546 | active_data: str = public.readFile(cls._bt_etc_pyenv) |
| 547 | if not active_data: |
| 548 | return None |
| 549 | |
| 550 | bin_path = active_data.split("\n", 1)[0].strip("#") |
| 551 | return bin_path |
| 552 | |
| 553 | def use2project(self, project_name: str): |
| 554 | if not project_name: |
no test coverage detected