From f5dd875a02f4d854ae66e40b180606cf264351c7 Mon Sep 17 00:00:00 2001 From: bibiak Date: Mon, 2 Oct 2023 14:13:50 +0000 Subject: [PATCH] moved txt_or_none outside if statement --- youtube_dl/extractor/tvp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/tvp.py b/youtube_dl/extractor/tvp.py index 5efae5f22..8f4a41063 100644 --- a/youtube_dl/extractor/tvp.py +++ b/youtube_dl/extractor/tvp.py @@ -21,6 +21,9 @@ from ..utils import ( ) +def txt_or_none(v, default=None): + return default if v is None else (compat_str(v).strip() or default) + if not hasattr(InfoExtractor, '_match_valid_url'): import sys @@ -35,9 +38,6 @@ if not hasattr(InfoExtractor, '_match_valid_url'): RegexNotFoundError, ) - def txt_or_none(v, default=None): - return default if v is None else (compat_str(v).strip() or default) - BaseIE = InfoExtractor class InfoExtractor(BaseIE):