Francois Gouget : testbot/web: Use AddError() in the job details page.

Alexandre Julliard julliard at winehq.org
Thu Jul 7 16:53:25 CDT 2022


Module: tools
Branch: master
Commit: 8087405e341b2cb9a1fbff430e4a69c210f6f1c3
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=8087405e341b2cb9a1fbff430e4a69c210f6f1c3

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jul  7 15:12:29 2022 +0200

testbot/web: Use AddError() in the job details page.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/web/JobDetails.pl | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 6d3f13cd..3fbdb427 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -185,20 +185,10 @@ sub OnJobControl($$)
 {
   my ($self, $Action) = @_;
 
-  my $ErrMessage = $self->CanDoJobControl($Action);
-  if (defined $ErrMessage)
-  {
-    $self->{EnclosingPage}->SetError(undef, $ErrMessage);
-    return !1;
-  }
+  return !1 if ($self->{EnclosingPage}->AddError($self->CanDoJobControl($Action)));
 
   my $JobId = $self->{EnclosingPage}->GetJob()->Id;
-  $ErrMessage = JobControl($Action, $JobId);
-  if (defined $ErrMessage)
-  {
-    $self->{EnclosingPage}->SetError(undef, $ErrMessage);
-    return !1;
-  }
+  return !1 if ($self->{EnclosingPage}->AddError(JobControl($Action, $JobId)));
 
   # Ideally this would use something like GetMoreInfoLink() to rebuild a Get
   # URL to preserve which logs and screenshots have been expanded. But if the




More information about the wine-cvs mailing list