(board: str, example: str | None = None)
| 172 | |
| 173 | |
| 174 | def main(board: str, example: str | None = None): |
| 175 | try: |
| 176 | size = check_firmware_size(board, example) |
| 177 | print(f"Firmware size for {board}: {size} bytes") |
| 178 | except FileNotFoundError as e: |
| 179 | print(f"Error: {e}") |
| 180 | except json.JSONDecodeError: |
| 181 | print(f"Error: Unable to parse build_info.json for {board}") |
| 182 | except KeyboardInterrupt as ki: |
| 183 | handle_keyboard_interrupt(ki) |
| 184 | raise |
| 185 | except Exception as e: |
| 186 | print(f"An unexpected error occurred: {e}") |
| 187 | |
| 188 | |
| 189 | if __name__ == "__main__": |
no test coverage detected