diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 97b5cbd5c..a7d32d5db 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -249,13 +249,15 @@ sub gettab { my $tab = xCAT::Table->new($tabn); (my $ent) = $tab->getAttribs(\%keyhash, keys %{$tabhash{$tabn}}); - foreach my $coln (keys %{$tabhash{$tabn}}) - { + if ($ent) { + foreach my $coln (keys %{$tabhash{$tabn}}) + { if ($terse > 0) { $callback->({data => ["" . $ent->{$coln}]}); } else { $callback->({data => ["$tabn.$coln: " . $ent->{$coln}]}); } + } } $tab->close; }