The angle brackets are not really part of the message-id. Making it
possible to get the message-id without them is helpful.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
def patch_field(matchobj):
fieldname = matchobj.group(1)
def patch_field(matchobj):
fieldname = matchobj.group(1)
- return str(patch[fieldname])
+
+ if fieldname == "_msgid_":
+ # naive way to strip < and > from message-id
+ val = string.strip(str(patch["msgid"]), "<>")
+ else:
+ val = str(patch[fieldname])
+
+ return val
for patch in patches:
print(format_field_re.sub(patch_field, format_str))
for patch in patches:
print(format_field_re.sub(patch_field, format_str))