aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 82a1daeb9..0457f3ded 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -9,6 +9,7 @@ import io
import json
import locale
import os
+import pipes
import platform
import re
import socket
@@ -927,3 +928,7 @@ class locked_file(object):
def read(self, *args):
return self.f.read(*args)
+
+
+def shell_quote(args):
+ return ' '.join(map(pipes.quote, args))