From 1b3046a4f9ddad288f3522ec89d9e6d146d56c57 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:07:44 +0100 Subject: [PATCH] l10n script: Fix comparison for picking up 'before' LANG comments --- scripts/find_localised_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 78f46157..7b38aa1e 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -68,7 +68,7 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op above = call.lineno - 2 current = call.lineno - 1 - above_line = lines[above].strip() if len(lines) < above else None + above_line = lines[above].strip() if len(lines) >= above else None current_line = lines[current].strip() for line in (above_line, current_line):