diff --git a/runbot_merge/models/patcher.py b/runbot_merge/models/patcher.py index 80fc20d3..83e47d93 100644 --- a/runbot_merge/models/patcher.py +++ b/runbot_merge/models/patcher.py @@ -75,11 +75,11 @@ def parse_show(p: Patch) -> ParseResult: f"found {header}.\nOnly 'medium' and 'fuller' formats are supported") # skip possible extra headers before the message - while next(lines, ' \n') != ' \n': + while not next(lines, ' ').isspace(): continue body = [] - while (l := next(lines, ' \n')) != ' \n': + while (l := next(lines, '')) and l.startswith(' '): body.append(l.removeprefix(' ')) # remainder should be the patch diff --git a/runbot_merge/tests/test_patching.py b/runbot_merge/tests/test_patching.py index a273e9cf..46dc516f 100644 --- a/runbot_merge/tests/test_patching.py +++ b/runbot_merge/tests/test_patching.py @@ -9,11 +9,11 @@ BASIC_UDIFF = """\ commit 0000000000000000000000000000000000000000 Author: 3 Discos Down Date: 2021-04-24T17:09:14Z - + whop whop whop - + diff --git a/b b/b index 000000000000..000000000000 100644 --- a/b