Use sys.platform.startswith

This commit is contained in:
Florian Bruhin 2014-05-05 14:19:06 +02:00
parent 182303b613
commit 2e744cf96d

View File

@ -82,7 +82,7 @@ def safe_shlex_split(s):
def shell_escape(s): def shell_escape(s):
"""Escape a string so it's safe to pass to a shell.""" """Escape a string so it's safe to pass to a shell."""
if sys.platform == 'win32': if sys.platform.startswith('win'):
# Oh dear flying sphagetti monster please kill me now... # Oh dear flying sphagetti monster please kill me now...
if not s: if not s:
# Is this an empty argument or a literal ""? It seems to depend on # Is this an empty argument or a literal ""? It seems to depend on