Francois Gouget : testbot: GetBatchUser() is a function, not a class method.

Alexandre Julliard julliard at winehq.org
Mon May 5 14:42:12 CDT 2014


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri May  2 19:50:42 2014 +0200

testbot: GetBatchUser() is a function, not a class method.

CreateUsers() is not a class method so there it no reason for GetBatchUser() to call it as if it was.

---

 testbot/bin/CheckForWinetestUpdate.pl |    5 +++--
 testbot/lib/WineTestBot/Patches.pm    |    2 +-
 testbot/lib/WineTestBot/Users.pm      |    6 ++----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index 8cbcc9c..c61fdba 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -46,6 +46,7 @@ use HTTP::Response;
 use HTTP::Status;
 use WineTestBot::Config;
 use WineTestBot::Jobs;
+use WineTestBot::Users;
 use WineTestBot::Log;
 use WineTestBot::Utils;
 use WineTestBot::VMs;
@@ -58,7 +59,7 @@ sub AddJob
   # First create a new job
   my $Jobs = WineTestBot::Jobs->CreateJobs();
   my $NewJob = $Jobs->Add();
-  $NewJob->User(WineTestBot::Users->GetBatchUser());
+  $NewJob->User(GetBatchUser());
   $NewJob->Priority($BaseJob && $Bits == 32 ? 6 : 7);
   $NewJob->Remarks("WineTest: " .
                    ($Bits == 32 ? ($BaseJob ? "base" : "other") : "64-bit") .
@@ -119,7 +120,7 @@ sub AddReconfigJob
   # First create a new job
   my $Jobs = WineTestBot::Jobs->CreateJobs();
   my $NewJob = $Jobs->Add();
-  $NewJob->User(WineTestBot::Users->GetBatchUser());
+  $NewJob->User(GetBatchUser());
   $NewJob->Priority(3);
   $NewJob->Remarks("Update Wine to latest git");
 
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index a478fbf..cebb064 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -180,7 +180,7 @@ sub Submit
   }
   if (! defined($User))
   {
-    $User = $Users->GetBatchUser();
+    $User = GetBatchUser();
   }
 
   my $Disposition = "Submitted job ";
diff --git a/testbot/lib/WineTestBot/Users.pm b/testbot/lib/WineTestBot/Users.pm
index 1f09446..ba1f6c3 100644
--- a/testbot/lib/WineTestBot/Users.pm
+++ b/testbot/lib/WineTestBot/Users.pm
@@ -404,11 +404,9 @@ sub Authenticate
                                 $self->AuthenticateBuiltin(@_);
 }
 
-sub GetBatchUser
+sub GetBatchUser()
 {
-  my $class = shift;
-
-  return $class->CreateUsers()->GetItem("batch");
+  return CreateUsers()->GetItem("batch");
 }
 
 1;




More information about the wine-cvs mailing list