From: Thomas Lamprecht Date: Wed, 17 Jul 2019 10:48:45 +0000 (+0200) Subject: followup: code cleanup X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff_plain;h=7e192a44f5773d56284ec912f585d41f9d47d615 followup: code cleanup Signed-off-by: Thomas Lamprecht --- diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm index 0daa9e7..83053db 100644 --- a/data/PVE/API2/ClusterConfig.pm +++ b/data/PVE/API2/ClusterConfig.pm @@ -173,9 +173,10 @@ my $config_change_lock = sub { my $members = PVE::Cluster::get_members(); if (scalar(keys %$members) > 1) { my $res = PVE::Cluster::cfs_lock_file('corosync.conf', 10, $code); - # cfs_lock_file only sets $@ - # lock_file does not propagate $@ unless we die here + + # cfs_lock_file only sets $@ but lock_file doesn't propagates $@ unless we die here die $@ if defined($@); + return $res; } else { return $code->();