Handle possible None
This commit is contained in:
parent
85e9d7595d
commit
324bc609ec
|
@ -78,7 +78,9 @@ async def _check_video(video):
|
|||
if error_message:
|
||||
error_message = error_message[7:]
|
||||
if error_message.startswith('AUTOYTARCHIVE:'):
|
||||
new_wait_time = int(error_message.split(':', 1)[1].split(' ', 1)[0]) - int(time.time())
|
||||
tmp = error_message.split(':', 1)[1].split(' ', 1)[0]
|
||||
if tmp.isnumeric():
|
||||
new_wait_time = int(tmp) - int(time.time())
|
||||
if new_wait_time > 0:
|
||||
wait_time = new_wait_time
|
||||
logging.error('Error on video %s: %s', video['yt_videoid'], error_message)
|
||||
|
|
Loading…
Reference in New Issue