From fc1282b3febc609c4f1f4f6905d0c694c69c6d5e Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Mon, 3 Jul 2017 08:02:49 -0700 Subject: [PATCH] Loosen tfa_results check Can also return None as well as False, check for falsey values instead. --- youtube_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 77cd271ef..6e56b2d6b 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -213,7 +213,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor): self._TFA_URL.format(tl), tfa_req, 'Submitting TFA code', 'Unable to submit TFA code') - if tfa_results is False: + if not tfa_results: return False tfa_res = try_get(tfa_results, lambda x: x[0][5], list)