diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index ecfe1aec1..4ef8242ef 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -484,7 +484,7 @@ sub get_win_prodkey { $keyent = $keytab->getAttribs({product=>$osvariant},"key"); } } - if ($keyent) { + if ($keyent and $keyent->{key}) { return "OnError".$keyent->{key}.""; } if ($xCAT::WinUtils::kmskeymap{$osvariant}) {