api add: remove now uneeded $cred_file variable
was used for cleanup, which is now handled by on_delete_hook Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
f9602323c6
commit
6d3b36e1b0
@ -163,8 +163,6 @@ __PACKAGE__->register_method ({
|
|||||||
|
|
||||||
$plugin->on_add_hook($storeid, $opts, password => $password);
|
$plugin->on_add_hook($storeid, $opts, password => $password);
|
||||||
|
|
||||||
my $cred_file = undef;
|
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
# try to activate if enabled on local node,
|
# try to activate if enabled on local node,
|
||||||
# we only do this to detect errors/problems sooner
|
# we only do this to detect errors/problems sooner
|
||||||
@ -175,7 +173,6 @@ __PACKAGE__->register_method ({
|
|||||||
if(my $err = $@) {
|
if(my $err = $@) {
|
||||||
eval { $plugin->on_delete_hook($storeid, $opts) };
|
eval { $plugin->on_delete_hook($storeid, $opts) };
|
||||||
warn "$@\n" if $@;
|
warn "$@\n" if $@;
|
||||||
unlink $cred_file if defined($cred_file);
|
|
||||||
die $err;
|
die $err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user