From 6fe959f8cef40b3213d8fd412b9c0476c5b42377 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Thu, 7 Aug 2025 11:59:39 +0200 Subject: [PATCH] nixos test driver: drop wrong assertion --- nixos/lib/test-driver/src/test_driver/machine/ocr.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index 5f74b2ccfbc1..9f56f9c901e4 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -12,10 +12,7 @@ def perform_ocr_on_screenshot(screenshot_path: Path) -> str: Perform OCR on a screenshot that contains text. Returns a string with all words that could be found. """ - variants = perform_ocr_variants_on_screenshot(screenshot_path, False)[0] - if len(variants) != 1: - raise MachineError(f"Received wrong number of OCR results: {len(variants)}") - return variants[0] + return perform_ocr_variants_on_screenshot(screenshot_path, False)[0] def perform_ocr_variants_on_screenshot(