From 2b12472711009d5a9d44d8141b111f40ef8f82f2 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 15 Jan 2005 16:09:37 +0000 Subject: [PATCH] Changed _getSep to raise ValueError instead of asserting. --- src/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index 7f020ebce..c46dbe779 100755 --- a/src/utils.py +++ b/src/utils.py @@ -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: