[execafterdownload] Simplify (#3569)

This commit is contained in:
Philipp Hagemeister 2014-08-25 10:18:01 +02:00
parent 1f06864e9a
commit 8d31fa3cce
4 changed files with 33 additions and 31 deletions

View file

@ -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)