Skip to content

Commit

Permalink
Break instead of continue when trying to download deleted Telegram image
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Oct 24, 2024
1 parent ec3422e commit ac543cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion processors/visualisation/download-telegram-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def get_images(self):
self.dataset.log(f"Could not download image for message {msg_id} - message is unavailable (it "
f"may have been deleted)")
self.flawless = False
continue
break

success = False
try:
Expand All @@ -223,6 +223,7 @@ async def get_images(self):
msg_id = str(message.id) if hasattr(message, "id") else f"with index {media_done:,}"
self.dataset.log(f"Could not download image for message {msg_id} ({e})")
self.flawless = False

finally:
media_done += 1
self.metadata[filename] = {
Expand Down

0 comments on commit ac543cc

Please sign in to comment.