From e0cfe722c7fb1d96f319a07fc3b61484ff392648 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 11 Nov 2003 14:06:19 +0000 Subject: [PATCH] Added an assert for easier debugging. --- src/ircutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ircutils.py b/src/ircutils.py index e233363d6..2e367dca1 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -287,6 +287,7 @@ def isValidArgument(s): notFunky = string.ascii[32:]+'\x02\x03\x0F\x16\x1F' def safeArgument(s): """If s is unsafe for IRC, returns a safe version.""" + assert not isinstance(s, unicode),'Unicode strings are not allowed in IRC.' if isValidArgument(s) and s.translate(string.ascii, notFunky) == '': return s else: