From 17a38ff9605dde315e456bc8d9adac9fd099b751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 25 May 2021 14:36:55 +0000 Subject: [PATCH] fix: json_load(): remove dead code --- lib/perl/OVH/Bastion/configuration.inc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/perl/OVH/Bastion/configuration.inc b/lib/perl/OVH/Bastion/configuration.inc index fd8c890..d8ace0d 100644 --- a/lib/perl/OVH/Bastion/configuration.inc +++ b/lib/perl/OVH/Bastion/configuration.inc @@ -783,7 +783,6 @@ sub json_load { # Check params my $file = $params{'file'}; - my $keywords = $params{'keywords'} || []; if (!$file) { return R('KO_MISSING_PARAMETER', msg => "Missing 'file' parameter"); @@ -829,15 +828,6 @@ sub json_load { return R('KO_INVALID_JSON', msg => "Error while trying to decode JSON configuration from file: $@"); } - # Check that each given keywords are defined - my @missing = map { defined($configuration->{$_}) ? () : $_ } keys %$configuration; - if (@missing) { - return R( - 'KO_MISSING_CONFIGURATION', - value => $configuration, - msg => "Configuration is lacking mandatory keywords: " . join(', ', @missing) - ); - } return R('OK', value => $configuration); }