Hydra/18: fixed uninitialized value error when logfile is null

This commit is contained in:
Rob Vermaas 2010-04-19 10:25:17 +00:00
parent ad5761bb25
commit 742846e476

View file

@ -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"