Skip to content

Commit 7b5d818

Browse files
replace deprecated has_key function with in operator
This should help with compatibility with stdlib >= 9.0.0 puppetlabs/puppetlabs-stdlib#1319
1 parent cdbdd71 commit 7b5d818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
}
7878
}
7979
'fact': {
80-
if $fact_name and has_key($::facts, $fact_name) {
80+
if $fact_name and $fact_name in $::facts {
8181
$resolved = $::facts[$fact_name]
8282
}
8383
else {
@@ -93,7 +93,7 @@
9393
}
9494
}
9595
'trusted': {
96-
if $trusted_extension_name and has_key($::trusted['extensions'], $trusted_extension_name) {
96+
if $trusted_extension_name and $trusted_extension_name in $::trusted['extensions'] {
9797
$resolved = $::trusted['extensions'][$trusted_extension_name]
9898
}
9999
else {

0 commit comments

Comments
 (0)