]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/compat/_legacy.py
[cleanup] Misc fixes
[yt-dlp.git] / yt_dlp / compat / _legacy.py
index 912907a0211e0c298b5b934be3ae8e3dc2868e91..90ccf0f14aac0265806a8f2a9221d8a6be3c6303 100644 (file)
 import shutil
 import socket
 import struct
+import subprocess
 import tokenize
 import urllib.error
 import urllib.parse
 import urllib.request
 import xml.etree.ElementTree as etree
-from subprocess import DEVNULL
 
 # isort: split
 import asyncio  # noqa: F401
@@ -85,7 +85,7 @@ def compat_setenv(key, value, env=os.environ):
 compat_Struct = struct.Struct
 compat_struct_pack = struct.pack
 compat_struct_unpack = struct.unpack
-compat_subprocess_get_DEVNULL = lambda: DEVNULL
+compat_subprocess_get_DEVNULL = lambda: subprocess.DEVNULL
 compat_tokenize_tokenize = tokenize.tokenize
 compat_urllib_error = urllib.error
 compat_urllib_HTTPError = urllib.error.HTTPError