[pve-devel] [PATCH storage 5/5] api add: remove now uneeded $cred_file variable

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jul 2 15:54:48 CEST 2018


was used for cleanup, which is now handled by on_delete_hook

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/API2/Storage/Config.pm | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm
index 434b1f3..b16054b 100755
--- a/PVE/API2/Storage/Config.pm
+++ b/PVE/API2/Storage/Config.pm
@@ -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;
 		}
 
-- 
2.17.1





More information about the pve-devel mailing list