Changed _getSep to raise ValueError instead of asserting.

This commit is contained in:
Jeremy Fincher 2005-01-15 16:09:37 +00:00
parent 4624115909
commit 2b12472711
1 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,8 @@ def quoted(s):
return '"%s"' % s
def _getSep(s):
assert len(s) >= 2
if len(s) < 2:
raise ValueError, 'string given to _getSep is too short: %r' % s
if s.startswith('m') or s.startswith('s'):
separator = s[1]
else: