From 2bd19274ac8dab339b405bbdab461f2b21edd076 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 5 Feb 2013 18:52:41 +0000 Subject: [PATCH] Fix problem where missing prodkey table would induce failure git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15067 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 3f94ad6ee..6bdeb4d38 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -372,7 +372,10 @@ sub windows_join_data { sub get_win_prodkey { my $osvariant = shift; my $keytab = xCAT::Table->new("prodkey",-create=>0); - my $keyent = $keytab->getAttribs({product=>$osvariant},"key"); + my $keyent; + if ($keytab) { + $keyent = $keytab->getAttribs({product=>$osvariant},"key"); + } if ($keyent) { return "OnError".$keyent->{key}.""; }