dont raise errors if not needed

This commit is contained in:
Dietmar Maurer 2011-12-16 06:32:09 +01:00
parent 9269013a93
commit 4d81a1d327

View File

@ -854,8 +854,6 @@ __PACKAGE__->register_method({
raise_param_exc({ skiplock => "Only root may use this option." }) raise_param_exc({ skiplock => "Only root may use this option." })
if $skiplock && $user ne 'root@pam'; if $skiplock && $user ne 'root@pam';
die "VM $vmid already running\n" if PVE::QemuServer::check_running($vmid);
my $storecfg = PVE::Storage::config(); my $storecfg = PVE::Storage::config();
my $realcmd = sub { my $realcmd = sub {
@ -910,8 +908,6 @@ __PACKAGE__->register_method({
raise_param_exc({ skiplock => "Only root may use this option." }) raise_param_exc({ skiplock => "Only root may use this option." })
if $skiplock && $user ne 'root@pam'; if $skiplock && $user ne 'root@pam';
die "VM $vmid not running\n" if !PVE::QemuServer::check_running($vmid);
my $storecfg = PVE::Storage::config(); my $storecfg = PVE::Storage::config();
my $realcmd = sub { my $realcmd = sub {
@ -1018,8 +1014,6 @@ __PACKAGE__->register_method({
raise_param_exc({ skiplock => "Only root may use this option." }) raise_param_exc({ skiplock => "Only root may use this option." })
if $skiplock && $user ne 'root@pam'; if $skiplock && $user ne 'root@pam';
die "VM $vmid not running\n" if !PVE::QemuServer::check_running($vmid);
my $storecfg = PVE::Storage::config(); my $storecfg = PVE::Storage::config();
my $realcmd = sub { my $realcmd = sub {