Module: tools Branch: master Commit: e9c3cacc6b62b1290e4b94c0a4e8a40c22264177 URL: http://source.winehq.org/git/tools.git/?a=commit;h=e9c3cacc6b62b1290e4b94c0a...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon Dec 4 18:27:30 2017 +0100
testbot: Don't try to use the Message-Id if the email had none.
This can happen if one directly feeds the output of git format-patch to the TestBot through formail, which can be useful for testing.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/lib/WineTestBot/Patches.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index b5320dc..42118e6 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -101,9 +101,12 @@ sub FromSubmission($$) $self->Subject(substr($Subject, 0, $PropertyDescriptor->GetMaxLength()));
my $MessageId = $Head->get("Message-Id"); - $MessageId =~ s/\s*\n\s*/ /gs; - $PropertyDescriptor = $self->GetPropertyDescriptorByName("MessageId"); - $self->MessageId(substr($MessageId, 0, $PropertyDescriptor->GetMaxLength())); + if ($MessageId) + { + $MessageId =~ s/\s*\n\s*/ /gs; + $PropertyDescriptor = $self->GetPropertyDescriptorByName("MessageId"); + $self->MessageId(substr($MessageId, 0, $PropertyDescriptor->GetMaxLength())); + }
$self->Disposition("Processing"); }