Fix bug: crash, if only one lamp ID is passed

This commit is contained in:
Bo Maryniuk 2015-10-13 00:23:12 +02:00 committed by C. R. Oldham
parent c0e6706d9a
commit 1e508e9155

View File

@ -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