mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't accept non-list input for pkgs arg
This commit is contained in:
parent
419221535b
commit
96c3df1ed5
1 changed files with 7 additions and 1 deletions
|
@ -474,7 +474,13 @@ def installed(name,
|
|||
bin_env = env
|
||||
|
||||
# If pkgs is present, ignore name
|
||||
if not pkgs:
|
||||
if pkgs:
|
||||
if not isinstance(pkgs, list):
|
||||
return {'name': name,
|
||||
'result': False,
|
||||
'changes': {},
|
||||
'comment': 'pkgs argument must be formatted as a list'}
|
||||
else:
|
||||
pkgs = [name]
|
||||
|
||||
# Assumption: If `pkg` is not an `string`, it's a `collections.OrderedDict`
|
||||
|
|
Loading…
Add table
Reference in a new issue