aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-08-25 10:18:01 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-08-25 10:18:01 +0200
commit8d31fa3cce47a7c9d932b872e277cf89eb3441a2 (patch)
treea1abbaef522fa03d13828622c364516fff4bfc02 /youtube_dl/utils.py
parent1f06864e9ab102b19569f13e2a02e18921a26511 (diff)
downloadyoutube-dl-8d31fa3cce47a7c9d932b872e277cf89eb3441a2.tar.xz
[execafterdownload] Simplify (#3569)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 8095400d0..2b05fd7b7 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -192,6 +192,13 @@ try:
except ImportError: # Python 2.6
from xml.parsers.expat import ExpatError as compat_xml_parse_error
+try:
+ from shlex import quote as shlex_quote
+except ImportError: # Python < 3.3
+ def shlex_quote(s):
+ return "'" + s.replace("'", "'\"'\"'") + "'"
+
+
def compat_ord(c):
if type(c) is int: return c
else: return ord(c)