Fixed read and apply config dicts

This commit is contained in:
Joel Collins 2019-06-12 17:23:24 +01:00
parent fdbba08b66
commit f31c28fe52
6 changed files with 42 additions and 25 deletions

View file

@ -144,7 +144,7 @@ class BaseCamera(metaclass=ABCMeta):
pass
@abstractmethod
def read_config(self):
def read_config(self) -> dict:
"""Return the current settings as a dictionary"""
pass

View file

@ -95,7 +95,7 @@ class StreamingCamera(BaseCamera):
self.camera.close()
# HANDLE SETTINGS
def read_config(self):
def read_config(self) -> dict:
"""
Return config dictionary of the StreamingCamera.
"""
@ -119,7 +119,7 @@ class StreamingCamera(BaseCamera):
return conf_dict
def apply_config(self, config: dict) -> None:
def apply_config(self, config: dict):
"""
Write a config dictionary to the StreamingCamera config.