diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-05-27 17:44:27 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-27 22:03:30 +0300 |
commit | 6eb1143e27d284200a672f957c8e5efbf87aafcc (patch) | |
tree | 9748228da511accd82eccd984c2b2ec22ded2133 /src/py/cam/cam_null.py | |
parent | bb1cbd53d267d45bcb8a8336a9daef5339e28f1a (diff) |
py: cam: Convert ctx and state to classes
Convert ctx and state dicts to classes. No functional changes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/py/cam/cam_null.py')
-rw-r--r-- | src/py/cam/cam_null.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/py/cam/cam_null.py b/src/py/cam/cam_null.py index a6da9671..45c5f467 100644 --- a/src/py/cam/cam_null.py +++ b/src/py/cam/cam_null.py @@ -9,8 +9,8 @@ class NullRenderer: def __init__(self, state): self.state = state - self.cm = state['cm'] - self.contexts = state['contexts'] + self.cm = state.cm + self.contexts = state.contexts self.running = False @@ -37,11 +37,11 @@ class NullRenderer: print('Exiting...') def readcam(self, fd): - self.running = self.state['event_handler'](self.state) + self.running = self.state.event_handler() def readkey(self, fileobj): sys.stdin.readline() self.running = False def request_handler(self, ctx, req): - self.state['request_prcessed'](ctx, req) + self.state.request_processed(ctx, req) |