summaryrefslogtreecommitdiffstats
path: root/yt_dlp/compat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:54:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:54:09 +0000
commitb91227758bfa7527946b3e8530614724928005ac (patch)
tree3ddfa5e0c43164b29f5682a9c94b09b34def2ee1 /yt_dlp/compat
parentAdding upstream version 2024.03.10. (diff)
downloadyt-dlp-b91227758bfa7527946b3e8530614724928005ac.tar.xz
yt-dlp-b91227758bfa7527946b3e8530614724928005ac.zip
Adding upstream version 2024.04.09.upstream/2024.04.09
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/compat')
-rw-r--r--yt_dlp/compat/__init__.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/yt_dlp/compat/__init__.py b/yt_dlp/compat/__init__.py
index 5ad5c70..d820ada 100644
--- a/yt_dlp/compat/__init__.py
+++ b/yt_dlp/compat/__init__.py
@@ -27,12 +27,9 @@ def compat_etree_fromstring(text):
compat_os_name = os._name if os.name == 'java' else os.name
-if compat_os_name == 'nt':
- def compat_shlex_quote(s):
- import re
- return s if re.match(r'^[-_\w./]+$', s) else s.replace('"', '""').join('""')
-else:
- from shlex import quote as compat_shlex_quote # noqa: F401
+def compat_shlex_quote(s):
+ from ..utils import shell_quote
+ return shell_quote(s)
def compat_ord(c):