It's currently possible to add a remote in PMG without password (via API), but deletion of such a remote would fail here.
Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> --- src/PVE/PBSClient.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 37385d7..f19199c 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -77,7 +77,7 @@ sub delete_password { my $pwfile = password_file_name($self); - unlink $pwfile or die "deleting password file failed - $!\n"; + unlink $pwfile or $! == ENOENT or die "deleting password file failed - $!\n"; }; sub get_password { -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel