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:
Thomas Lamprecht
2018-07-02 15:54:48 +02:00
committed by Wolfgang Bumiller
parent f9602323c6
commit 6d3b36e1b0

View File

@ -163,8 +163,6 @@ __PACKAGE__->register_method ({
$plugin->on_add_hook($storeid, $opts, password => $password);
my $cred_file = undef;
eval {
# try to activate if enabled on local node,
# we only do this to detect errors/problems sooner
@ -175,7 +173,6 @@ __PACKAGE__->register_method ({
if(my $err = $@) {
eval { $plugin->on_delete_hook($storeid, $opts) };
warn "$@\n" if $@;
unlink $cred_file if defined($cred_file);
die $err;
}