Skip to content

Commit de0edc2

Browse files
committed
Fix unittest on icinga inventory plugin
1 parent 7c5e7a2 commit de0edc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/inventory/icinga.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ def _create_filter(self):
329329
continue
330330

331331
# Make sure every key within filters is considered a list, cast string to single entry list
332-
if isinstance(value, AnsibleMapping):
332+
if isinstance(value, (AnsibleMapping, dict)):
333333
value = dict(value)
334-
elif isinstance(value, AnsibleSequence):
334+
elif isinstance(value, (AnsibleSequence, list)):
335335
value = [to_text(val) for val in value]
336336
else:
337337
value = [to_text(value)]
@@ -358,7 +358,7 @@ def _create_filter(self):
358358
continue
359359

360360
# Make sure 'attribute_values' is considered a list, cast string to single entry list
361-
if isinstance(attribute_values, AnsibleSequence):
361+
if isinstance(attribute_values, (AnsibleSequence, list)):
362362
attribute_values = [to_text(val) for val in attribute_values]
363363
else:
364364
attribute_values = [to_text(attribute_values)]

0 commit comments

Comments
 (0)