[pve-devel] [PATCH v1 pve-common 16/18] pbsclient: don't return anything in `forget_snapshot`
Max Carrara
m.carrara at proxmox.com
Fri Aug 2 15:26:54 CEST 2024
The actual `proxmox-backup-client forget` command doesn't return
anything (despite the `--output-format json` flag), which is why this
method ends up returning `undef` on successful calls (due to the JSON
parse in `run_client_cmd` returning `undef`).
Therefore, make it explicit that nothing is returned to make it more
clear what the code does.
Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
src/PVE/PBSClient.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm
index 4adb04c..aeceed3 100644
--- a/src/PVE/PBSClient.pm
+++ b/src/PVE/PBSClient.pm
@@ -681,7 +681,8 @@ sub forget_snapshot {
(my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot);
- return run_client_cmd($self, 'forget', [ "$snapshot" ], 1, undef, $namespace)
+ run_client_cmd($self, 'forget', [ "$snapshot" ], 1, undef, $namespace);
+ return;
};
=pod
--
2.39.2
More information about the pve-devel
mailing list