patchutils.py: Reset the Signed-off-by header after parsing each patch.

This commit is contained in:
Sebastian Lackner 2016-03-22 08:17:01 +01:00
parent d6f0fd33c7
commit b0cbb8bda2

View File

@ -323,6 +323,7 @@ def read_patch(filename, content=None):
elif line.startswith("From: "):
header['author'], header['email'] = _parse_author(line[6:])
header.pop('signedoffby', None)
assert fp.read() == line
elif line.startswith("Subject: "):
@ -338,6 +339,7 @@ def read_patch(filename, content=None):
subject = re.sub('^([^:]*: *)([a-z])', lambda x: "%s%s" %
(x.group(1), x.group(2).upper()), subject, 1)
header['subject'], header['revision'] = subject, revision
header.pop('signedoffby', None)
elif line.startswith("Signed-off-by: "):
if not header.has_key('signedoffby'):