Exit the upload when failing to add video to a playlist on Youtube, to be more consistent with Peertube, fix #33

This commit is contained in:
LecygneNoir 2019-08-11 11:05:07 +02:00
parent 070e05de0b
commit 42a20308f0

View file

@ -252,8 +252,10 @@ def set_playlist(youtube, playlist_id, video_id):
except Exception as e:
if hasattr(e, 'message'):
logging.error("Youtube: Error: " + str(e.message))
exit(1)
else:
logging.error("Youtube: Error: " + str(e))
exit(1)
logging.info('Youtube: Video is correctly added to the playlist.')