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)
|
||||
except AttributeError:
|
||||
continue
|
||||
if isinstance(attr, int):
|
||||
val: Any = web_request.get_int(field)
|
||||
if isinstance(attr, bool):
|
||||
val: Any = web_request.get_boolean(field)
|
||||
elif isinstance(attr, int):
|
||||
val = web_request.get_int(field)
|
||||
elif isinstance(attr, float):
|
||||
val = web_request.get_float(field)
|
||||
elif isinstance(attr, bool):
|
||||
val = web_request.get_boolean(field)
|
||||
elif isinstance(attr, str):
|
||||
val = web_request.get_str(field)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user