testbot: GetBatchUser() is a function, not a class method.
Francois Gouget
fgouget at codeweavers.com
Fri May 2 12:50:42 CDT 2014
CreateUsers() is not a class method so there it no reason for GetBatchUser() to call it as if it was.
---
Some more simple tip of the iceberg patches.
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;
--
1.9.2
More information about the wine-patches
mailing list