aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils/_utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-06-21 09:21:20 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-06-21 09:21:20 +0530
commitad54c9130e793ce433bf9da334fa80df9f3aee58 (patch)
tree859a37aa6647ac90e619ba85aa5db58a0c733ae9 /yt_dlp/utils/_utils.py
parentdb3ad8a67661d7b234a6954d9c6a4a9b1749f5eb (diff)
downloadhypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.tar.lz
hypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.tar.xz
hypervideo-pre-ad54c9130e793ce433bf9da334fa80df9f3aee58.zip
[cleanup] Misc
Closes #6288, Closes #7197, Closes #7265, Closes #7353, Closes #5773 Authored by: mikf, freezboltz, pukkandan
Diffstat (limited to 'yt_dlp/utils/_utils.py')
-rw-r--r--yt_dlp/utils/_utils.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py
index 28c2785cb..bc1bc9116 100644
--- a/yt_dlp/utils/_utils.py
+++ b/yt_dlp/utils/_utils.py
@@ -872,12 +872,6 @@ class netrc_from_content(netrc.netrc):
self._parse('-', stream, False)
-def process_communicate_or_kill(p, *args, **kwargs):
- deprecation_warning(f'"{__name__}.process_communicate_or_kill" is deprecated and may be removed '
- f'in a future version. Use "{__name__}.Popen.communicate_or_kill" instead')
- return Popen.communicate_or_kill(p, *args, **kwargs)
-
-
class Popen(subprocess.Popen):
if sys.platform == 'win32':
_startupinfo = subprocess.STARTUPINFO()
@@ -1662,7 +1656,7 @@ def unified_strdate(date_str, day_first=True):
def unified_timestamp(date_str, day_first=True):
- if date_str is None:
+ if not isinstance(date_str, str):
return None
date_str = re.sub(r'\s+', ' ', re.sub(
@@ -2454,7 +2448,7 @@ def request_to_url(req):
return req
-def strftime_or_none(timestamp, date_format, default=None):
+def strftime_or_none(timestamp, date_format='%Y%m%d', default=None):
datetime_object = None
try:
if isinstance(timestamp, (int, float)): # unix timestamp