mirror of https://github.com/yt-dlp/yt-dlp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
539 B
Python
31 lines
539 B
Python
1 year ago
|
"""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)
|