From 3da04de6fd83bca19447a865bf84b3403a14e0c1 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 11 Jun 2023 05:06:28 +0300 Subject: ipcam/config: fix schema validation --- include/py/homekit/camera/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/py/homekit/camera/config.py b/include/py/homekit/camera/config.py index 331e595..0d4c747 100644 --- a/include/py/homekit/camera/config.py +++ b/include/py/homekit/camera/config.py @@ -65,7 +65,7 @@ class IpcamConfig(ConfigUnit): if 'ext_hdd' not in linux_box: raise ValueError(f'cam-{n}: linux box {cam["server"]} must have ext_hdd defined') disk = cam['disk']-1 - if disk < 0 or disk >= len(linux_box['ext_hdd']): + if disk < 1 or disk >= len(linux_box['ext_hdd']): raise ValueError(f'cam-{n}: invalid disk index for linux box {cam["server"]}') @classmethod -- cgit v1.2.3