From cd27c046b0b0fdec9066a89d35bc33f189bd3625 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Oct 2009 13:55:54 +0000 Subject: [PATCH] * Fix an apparent incompatibility with recent DBIx::Class. --- src/script/hydra_build.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/script/hydra_build.pl b/src/script/hydra_build.pl index ffe894a2..d1eea473 100755 --- a/src/script/hydra_build.pl +++ b/src/script/hydra_build.pl @@ -30,6 +30,7 @@ sub getBuildLog { return -e $logPath ? $logPath : undef; } + sub sendTwitterNotification { my ($build) = @_; @@ -61,6 +62,7 @@ sub sendTwitterNotification { warn "$@\n" if $@; } + sub sendEmailNotification { my ($build) = @_; @@ -197,8 +199,9 @@ sub doBuild { "--no-build-output --log-type flat --print-build-trace " . "--add-root " . gcRootFor $outPath . " 2>&1"; - my $buildStepNr = $build->buildsteps->find({}, - {select => {max => 'stepnr + 1'}, as => ['max']})->get_column('max') || 1; + my $max = $build->buildsteps->find( + {}, {select => {max => 'stepnr + 1'}, as => ['max']}); + my $buildStepNr = defined $max ? $max->get_column('max') : 1; my %buildSteps;