Skip to content

Commit

Permalink
feat(youtube): add exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
hldh214 committed Dec 28, 2020
1 parent 68a6e38 commit c7bbd5c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions recorder/destination/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,13 @@ def upload(
return response['id']

def check_uploaded(self, video_id):
response = self.youtube.videos().list(
part='processingDetails',
id=video_id
).execute()
try:
response = self.youtube.videos().list(
part='processingDetails',
id=video_id
).execute()
except OSError:
return False

if not response['items']:
return False
Expand Down

0 comments on commit c7bbd5c

Please sign in to comment.