Francois Gouget : testbot/WineSendLog: Remove FatalError().

Alexandre Julliard julliard at winehq.org
Thu May 1 11:53:36 CDT 2014


Module: tools
Branch: master
Commit: 4ae0a6dc40acb17291cd5ddeb4b3625a088a86f7
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=4ae0a6dc40acb17291cd5ddeb4b3625a088a86f7

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu May  1 14:22:59 2014 +0200

testbot/WineSendLog: Remove FatalError().

Its main point was to trace the JobId but the $Job parameter was never
used. So the code is clearer without it.

---

 testbot/bin/WineSendLog.pl |   18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index b375447..24cdd48 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -42,16 +42,6 @@ use WineTestBot::Jobs;
 use WineTestBot::Log;
 use WineTestBot::StepsTasks;
 
-sub FatalError
-{
-  my ($ErrMessage, $Job) = @_;
-
-  my $JobKey = defined($Job) ? $Job->GetKey() : "0";
-
-  LogMsg "$JobKey $ErrMessage";
-
-  exit 1;
-}
 
 sub IsBotFailure
 {
@@ -535,17 +525,19 @@ if ($JobId =~ /^(\d+)$/)
 }
 else
 {
-  FatalError "Invalid JobId $JobId\n";
+  LogMsg "Invalid JobId $JobId\n";
+  exit(1);
 }
 
 my $Job = CreateJobs()->GetItem($JobId);
 if (! defined($Job))
 {
-  FatalError "Job $JobId doesn't exist\n";
+  LogMsg "Job $JobId doesn't exist\n";
+  exit(1);
 }
 
 SendLog($Job);
 
 LogMsg "Log for job $JobId sent\n";
 
-exit;
+exit(0);




More information about the wine-cvs mailing list