From 728804a46a47f6a4d5cf3828d862e0702f797871 Mon Sep 17 00:00:00 2001 From: Pergola Fabio Date: Wed, 20 Sep 2023 19:38:57 +0200 Subject: [PATCH] fix for test --- hikvision-doorbell/src/doorbell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hikvision-doorbell/src/doorbell.py b/hikvision-doorbell/src/doorbell.py index f54719e..35e56c6 100644 --- a/hikvision-doorbell/src/doorbell.py +++ b/hikvision-doorbell/src/doorbell.py @@ -276,7 +276,7 @@ def sdk_device_ability() -> int: def isapi_io_outputs() -> int: io_outputs_xml = self._call_isapi("GET", "/ISAPI/System/IO/outputs") root = ET.fromstring(io_outputs_xml) - if 'IOOutputPortList' not in root.tag or len(root) is 0: + if 'IOOutputPortList' not in root.tag or len(root) == 0: # XML does not contain the required tag raise RuntimeError(f'Unexpected XML response: {io_outputs_xml}') return len(root)