(version_path: AnyStr)
| 76 | |
| 77 | @staticmethod |
| 78 | def read(version_path: AnyStr) -> int: |
| 79 | with open(version_path) as f: |
| 80 | line = f.readline().strip() |
| 81 | try: |
| 82 | return int(line) |
| 83 | except ValueError: |
| 84 | logger.exception(f"Cast '{line}' to int error.") |
| 85 | return 0 |
| 86 | |
| 87 | |
| 88 | def find_last_build_dir(hint: Optional[AnyStr] = None) -> Optional[AnyStr]: |
no outgoing calls