Add check to make sure the objtype value is provided.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2669 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2009-01-29 18:42:59 +00:00
parent 1cc6b66c5c
commit 5f60447279

View File

@ -1916,6 +1916,15 @@ sub setFINALattrs
}
# get the data type definition from Schema.pm
if (!$::FILEATTRS{$objname}{objtype}) {
my $rsp;
$rsp->{data}->[0] = "\nNo objtype value was specified for \'$objname\'. Cannot create object definition.\n";
xCAT::MsgUtils->message("E", $rsp, $::callback);
$error = 1;
next;
}
my $datatype =
$xCAT::Schema::defspec{$::FILEATTRS{$objname}{objtype}};
my @list;