diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-07-02 20:08:24 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-25 23:46:57 +0300 |
commit | 7058dd071accc0bafe5c4024e30631fb56fd7126 (patch) | |
tree | 714eac13b02a511c180cab116c3474eb3f5ae59d /tools/patman/patchstream.py | |
parent | 961420fa5f3bcf837518e7f72d6f8c3ee090643d (diff) | |
download | u-boot-7058dd071accc0bafe5c4024e30631fb56fd7126.tar.xz |
patman: Detect unexpected END
Detect unexpected 'END' line when a section is not detected.
This patch detect issue when tag name for section start is misspelled,
for example 'Commit-note:' for 'Commit-notes:'
Commit-note:
....
END
Then 'Commit-note:' is removed silently by re_remove = "Commit-\w*:"
but 'END' is kept in commit message.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r-- | tools/patman/patchstream.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 0c68c86156..70acb09642 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -269,6 +269,10 @@ class PatchStream: else: self.section.append(line) + # If we are not in a section, it is an unexpected END + elif line == 'END': + raise ValueError("'END' wihout section") + # Detect the commit subject elif not is_blank and self.state == STATE_PATCH_SUBJECT: self.commit.subject = line |