Fix unicode bug

This commit is contained in:
Valentin Lorentz 2010-11-28 17:47:38 +01:00
parent 15de8c2345
commit f2a0b60e79
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ def rsplit(s, sep=None, maxsplit=-1):
def normalizeWhitespace(s, removeNewline=True):
"""Normalizes the whitespace in a string; \s+ becomes one space."""
s = str(s)
if removeNewline:
s = str.replace(s, '\n', '')
while ' ' in s: