diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-08-25 10:18:01 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-08-25 10:18:01 +0200 |
commit | 8d31fa3cce47a7c9d932b872e277cf89eb3441a2 (patch) | |
tree | a1abbaef522fa03d13828622c364516fff4bfc02 /youtube_dl/utils.py | |
parent | 1f06864e9ab102b19569f13e2a02e18921a26511 (diff) |
[execafterdownload] Simplify (#3569)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 7 |
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) |