don't use walrus operator

Forgot I was trying to support 3.6+.
This commit is contained in:
Soren I. Bjornstad 2021-09-20 12:18:18 -05:00
parent 465c1c0665
commit cf69aa54dd
1 changed files with 2 additions and 1 deletions

View File

@ -476,7 +476,8 @@ def _set_nontext_field(field: str, mappings: Dict[str, str]) -> None:
# First check if the field exists and is currently not set to new_text...
line_to_change = -1
for idx, line in enumerate(tiddler_lines):
if m := re.match(f"^{field}: (?P<value>.*)", line):
m = re.match(f"^{field}: (?P<value>.*)", line)
if m:
if m.group('value') != new_text:
line_to_change = idx
break