aboutsummaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-07-02 19:08:24 +0200
committerSimon Glass <sjg@chromium.org>2020-07-20 11:37:47 -0600
commitdf1fa4b2239aaf2e4a7b72ff1e81cfa53af8b08e (patch)
treece8c22e6a96ca61c46ca25ee4da63debb5e1b932 /tools/patman
parentf07e58b878fc18bd69d2c19075f0fb8d7d35da00 (diff)
downloadu-boot-df1fa4b2239aaf2e4a7b72ff1e81cfa53af8b08e.zip
u-boot-df1fa4b2239aaf2e4a7b72ff1e81cfa53af8b08e.tar.gz
u-boot-df1fa4b2239aaf2e4a7b72ff1e81cfa53af8b08e.tar.bz2
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')
-rw-r--r--tools/patman/patchstream.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 0c68c86..70acb09 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