From bef64f2b218d767a0b9f7389367094d9102cbcf3 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 17 Feb 2004 05:14:57 +0000 Subject: [PATCH] Should fix bugz0r with OptionList.tokenize. --- plugins/MoobotFactoids.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/MoobotFactoids.py b/plugins/MoobotFactoids.py index 6787f2076..84d2d1c06 100644 --- a/plugins/MoobotFactoids.py +++ b/plugins/MoobotFactoids.py @@ -82,7 +82,9 @@ class OptionList(object): elif token == ')': if len(ret) > 1: if '|' in ret: - L = map(''.join,utils.itersplit(lambda x: x=='|', ret)) + L = map(''.join, + utils.itersplit('|'.__eq__, ret, + yieldEmpty=True)) return random.choice(L) else: return ''.join(ret)