(obj: Any, method_name: str)
| 22 | |
| 23 | |
| 24 | def _safe_call(obj: Any, method_name: str) -> str | None: |
| 25 | if not hasattr(obj, method_name): |
| 26 | return None |
| 27 | try: |
| 28 | value = getattr(obj, method_name)() |
| 29 | except Exception: |
| 30 | return None |
| 31 | return str(value) |
| 32 | |
| 33 | |
| 34 | def _device_info(device: Any, index: int) -> DeviceInfo: |