|
|
@ -2617,6 +2617,14 @@ except ImportError: # Python 2
|
|
|
|
parsed_result[name] = [value]
|
|
|
|
parsed_result[name] = [value]
|
|
|
|
return parsed_result
|
|
|
|
return parsed_result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compat_os_name = os._name if os.name == 'java' else os.name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if compat_os_name == 'nt':
|
|
|
|
|
|
|
|
def compat_shlex_quote(s):
|
|
|
|
|
|
|
|
return s if re.match(r'^[-_\w./]+$', s) else '"%s"' % s.replace('"', '\\"')
|
|
|
|
|
|
|
|
else:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from shlex import quote as compat_shlex_quote
|
|
|
|
from shlex import quote as compat_shlex_quote
|
|
|
|
except ImportError: # Python < 3.3
|
|
|
|
except ImportError: # Python < 3.3
|
|
|
@ -2649,9 +2657,6 @@ def compat_ord(c):
|
|
|
|
return ord(c)
|
|
|
|
return ord(c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compat_os_name = os._name if os.name == 'java' else os.name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if sys.version_info >= (3, 0):
|
|
|
|
if sys.version_info >= (3, 0):
|
|
|
|
compat_getenv = os.getenv
|
|
|
|
compat_getenv = os.getenv
|
|
|
|
compat_expanduser = os.path.expanduser
|
|
|
|
compat_expanduser = os.path.expanduser
|
|
|
|