Skip to content

Commit

Permalink
strand-braid-user: minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Nov 15, 2024
1 parent e006945 commit 7b301f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strand-braid-user/scripts/strand_cam_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()

0 comments on commit 7b301f2

Please sign in to comment.