]> git.proxmox.com Git - pve-storage.git/commitdiff
api add: remove now uneeded $cred_file variable
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 2 Jul 2018 13:54:48 +0000 (15:54 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 3 Jul 2018 10:27:34 +0000 (12:27 +0200)
was used for cleanup, which is now handled by on_delete_hook

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Storage/Config.pm

index 434b1f3a7e5ea30f6a5fa201fd048f1de3e5e159..b16054b3c7ec0225fecc4accc1d7e60081d197cd 100755 (executable)
@@ -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;
                }