]> git.proxmox.com Git - pve-common.git/commitdiff
restenv: remove unnecessary if
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 25 Jul 2017 13:32:20 +0000 (15:32 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 18 Aug 2017 08:21:50 +0000 (10:21 +0200)
we return early from this function if the $rest_env singleton doesn't
evaluates to true yet, so this check is useless here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/RESTEnvironment.pm

index c528e61704402a69e79c095fedf0c204de4409e1..2aee8dea852e3883904c0484be70cc279eb90d02 100644 (file)
@@ -60,8 +60,7 @@ my $log_task_result = sub {
        $msg = $task->{status};
     }
 
        $msg = $task->{status};
     }
 
-    $rest_env->log_cluster_msg($pri, $user, "end task $upid $msg")
-       if $rest_env;
+    $rest_env->log_cluster_msg($pri, $user, "end task $upid $msg");
 };
 
 my $worker_reaper = sub {
 };
 
 my $worker_reaper = sub {