api: followup style/comment improvements

try to comment why not what, what is already described good enough by
the code here.

Also, we want to go up to 100cc text-width if it improves
readability, which for post-if's it most often does.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2021-09-06 08:32:15 +02:00
parent f6aeefff54
commit 3de1c50a89

View File

@ -487,10 +487,8 @@ __PACKAGE__->register_method ({
eval { run_command($cmd, errmsg => 'import failed'); };
# unlinks only the temporary file from the http server
unlink $tmpfilename;
warn "unable to clean up temporary file '$tmpfilename' - $!\n"
if $! && $! != ENOENT;
unlink $tmpfilename; # the temporary file got only uploaded locally, no need to rm remote
warn "unable to clean up temporary file '$tmpfilename' - $!\n" if $! && $! != ENOENT;
if (my $err = $@) {
eval { $err_cleanup->() };