[pve-devel] [PATCH storage v3 3/4] fix #3972: Switched to using log_warn of PVE::RESTEnvironment
Fabian Ebner
f.ebner at proxmox.com
Mon Jun 13 10:34:18 CEST 2022
Am 20.05.22 um 15:28 schrieb Daniel Tschlatscher:
> Signed-off-by: Daniel Tschlatscher <d.tschlatscher at proxmox.com>
Commit title shouldn't include "fix #3972"
> ---
> PVE/Storage.pm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 6f2558f..98ecd60 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -1604,7 +1604,8 @@ sub archive_auxiliaries_remove {
> my $path = "$dirname/$filename";
>
> if (-e $path) {
> - unlink $path or $! == ENOENT or warn "Removing $type file failed: $!\n";
> + unlink $path or $! == ENOENT
> + or PVE::RESTEnvironment::log_warn("Removing $type file failed: $!");
Missing use/import for the module. And you could import log_warn
directly so that it can be used without the package prefix to make
everything fit on one line here.
> }
> }
> }
More information about the pve-devel
mailing list