summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-08-08 14:38:13 (GMT)
committerGreg Ward <gward@python.net>2000-08-08 14:38:13 (GMT)
commit2b042ded19bc7efa43551da297c29dc142b7d73c (patch)
tree432ce0e49e61e092da801caa1a4432d762bb13d8 /Lib
parente5034378cc2e46f9a7233269a5687bfec8c8c303 (diff)
downloadcpython-2b042ded19bc7efa43551da297c29dc142b7d73c.zip
cpython-2b042ded19bc7efa43551da297c29dc142b7d73c.tar.gz
cpython-2b042ded19bc7efa43551da297c29dc142b7d73c.tar.bz2
Fix so 'split_quoted()' handles any whitespace delimiter (not just space).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 96266d2..2487f6d 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -139,7 +139,7 @@ def grok_environment_error (exc, prefix="error: "):
# Needed by 'split_quoted()'
-_wordchars_re = re.compile(r'[^\\\'\"\ ]*')
+_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
@@ -169,7 +169,7 @@ def split_quoted (s):
words.append(s[:end])
break
- if s[end] == ' ': # unescaped, unquoted space: now
+ if s[end] in string.whitespace: # unescaped, unquoted whitespace: now
words.append(s[:end]) # we definitely have a word delimiter
s = string.lstrip(s[end:])
pos = 0