0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-01 03:43:02 +00:00
yt-dlp/yt_dlp/utils/_deprecated.py

31 lines
539 B
Python
Raw Normal View History

"""Deprecated - New code should avoid these"""
from ._utils import preferredencoding
def encodeFilename(s, for_subprocess=False):
assert isinstance(s, str)
return s
def decodeFilename(b, for_subprocess=False):
return b
def decodeArgument(b):
return b
def decodeOption(optval):
if optval is None:
return optval
if isinstance(optval, bytes):
optval = optval.decode(preferredencoding())
assert isinstance(optval, str)
return optval
def error_to_compat_str(err):
return str(err)