From 742846e476b61816d8baf002e1e93ff0146625c1 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 19 Apr 2010 10:25:17 +0000 Subject: [PATCH] Hydra/18: fixed uninitialized value error when logfile is null --- src/script/hydra_build.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/hydra_build.pl b/src/script/hydra_build.pl index 38cf5611..05162c55 100755 --- a/src/script/hydra_build.pl +++ b/src/script/hydra_build.pl @@ -148,7 +148,7 @@ sub sendEmailNotification { my $loglines = 50; my $logfile = $build->resultInfo->logfile; - my $logtext = `tail -$loglines $logfile` if -e $logfile; + my $logtext = defined $logfile && -e $logfile ? `tail -$loglines $logfile` : "No logfile available.\n"; my $body = "Hi,\n" . "\n"