mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix bug: crash, if only one lamp ID is passed
This commit is contained in:
parent
c0e6706d9a
commit
1e508e9155
1 changed files with 2 additions and 1 deletions
|
@ -129,7 +129,8 @@ def _get_devices(params):
|
|||
if 'id' not in params:
|
||||
raise CommandExecutionError("Parameter ID is required.")
|
||||
|
||||
return [int(dev) for dev in params['id'].split(",")]
|
||||
return type(params['id']) == int and [params['id']] \
|
||||
or [int(dev) for dev in params['id'].split(",")]
|
||||
|
||||
|
||||
# Callers
|
||||
|
|
Loading…
Add table
Reference in a new issue