Merge pull request #449 from wagnerch/fix-retry

add break for successful attempt
This commit is contained in:
anxdpanic 2023-04-23 10:56:01 -04:00 committed by GitHub
commit 7d8bbcf199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -764,6 +764,9 @@ class VideoInfo(object):
if attempt == 0:
payload['context']['client']['clientName'] = 'ANDROID_EMBEDDED_PLAYER'
continue
## if we get here then break out of loop as this attempt was successful
break
except:
error_message = 'Failed to get player response for video_id "%s"' % video_id
self._context.log_error(error_message + '\n' + traceback.format_exc())