From 7b301f296d8e583a3c23874044784459092bf786 Mon Sep 17 00:00:00 2001 From: Andrew Straw Date: Fri, 15 Nov 2024 09:03:53 +0100 Subject: [PATCH] strand-braid-user: minor improvement --- strand-braid-user/scripts/strand_cam_subscriber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strand-braid-user/scripts/strand_cam_subscriber.py b/strand-braid-user/scripts/strand_cam_subscriber.py index bb23737e3..77a4bb081 100644 --- a/strand-braid-user/scripts/strand_cam_subscriber.py +++ b/strand-braid-user/scripts/strand_cam_subscriber.py @@ -83,6 +83,7 @@ def main(): # We are only interested in image events here. if event_type == image_event: # Extract the data URL into its raw binary bytes + assert data["firehose_frame_data_url"].startswith(jpeg_prefix) response = urllib.request.urlopen(data["firehose_frame_data_url"]) bytes = response.file.read() @@ -95,7 +96,6 @@ def main(): # Send "we received the image and are thus ready for a new one". strand_cam.post({"FirehoseNotify": data["ck"]}) - assert data["firehose_frame_data_url"].startswith(jpeg_prefix) if __name__ == "__main__": main()