From 1cbda534df9a0b7866b7c68ed0ce156a23e50612 Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 24 Feb 2019 08:23:26 +0000 Subject: [PATCH] provide timeout on final download complete --- gphotos/GooglePhotosDownload.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gphotos/GooglePhotosDownload.py b/gphotos/GooglePhotosDownload.py index 16831d0c..1b747293 100644 --- a/gphotos/GooglePhotosDownload.py +++ b/gphotos/GooglePhotosDownload.py @@ -243,7 +243,9 @@ def do_download_complete(self, """ for future in futures_list: media_item = self.pool_future_to_media.get(future) - e = future.exception() + timeout = self.video_timeout if media_item.is_video() else \ + self.image_timeout + e = future.exception(timeout=timeout) if e: self.files_download_failed += 1 log.error('FAILURE %d downloading %s',