catch exception when storage does not exists

This commit is contained in:
Dietmar Maurer 2012-01-17 13:12:40 +01:00
parent 254575e971
commit f0cab979e5

View File

@ -1756,8 +1756,14 @@ sub disksize {
if ($volid =~ m|^/|) {
$path = $timeoutid = $volid;
} else {
eval {
$storeid = $timeoutid = PVE::Storage::parse_volume_id($volid);
$path = PVE::Storage::path($storecfg, $volid);
};
if (my $err = $@) {
warn $err;
return undef;
}
}
my $last_timeout = $storage_timeout_hash->{$timeoutid};