(version_file: str = "/opt/maca/Version.txt")
| 674 | } |
| 675 | |
| 676 | def get_maca_version(version_file: str = "/opt/maca/Version.txt") -> list[int]: |
| 677 | try: |
| 678 | with open(version_file, "r", encoding="utf-8") as f: |
| 679 | version_str = f.readline().strip() |
| 680 | target_version = [int(part) for part in version_str.split(":")[1].split(".")] |
| 681 | except Exception as e: |
| 682 | print(f"Trigger exception: {type(e).__name__} - {e}") |
| 683 | raise |
| 684 | return target_version |
| 685 | |
| 686 | maca_version = get_maca_version(f"{maca_path}/Version.txt") |
| 687 | if len(maca_version) == 4: |
no test coverage detected