webcam: fix boolean updates
In Python a "bool" is a subclass of int. When introspecting a webcam's attributes it is necessary to check for booleans before integers. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
937c766ded
commit
a22033ac49
@ -335,12 +335,12 @@ class WebCam:
|
|||||||
attr = getattr(self, field)
|
attr = getattr(self, field)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
if isinstance(attr, int):
|
if isinstance(attr, bool):
|
||||||
val: Any = web_request.get_int(field)
|
val: Any = web_request.get_boolean(field)
|
||||||
|
elif isinstance(attr, int):
|
||||||
|
val = web_request.get_int(field)
|
||||||
elif isinstance(attr, float):
|
elif isinstance(attr, float):
|
||||||
val = web_request.get_float(field)
|
val = web_request.get_float(field)
|
||||||
elif isinstance(attr, bool):
|
|
||||||
val = web_request.get_boolean(field)
|
|
||||||
elif isinstance(attr, str):
|
elif isinstance(attr, str):
|
||||||
val = web_request.get_str(field)
|
val = web_request.get_str(field)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user