Added an assert for easier debugging.

This commit is contained in:
Jeremy Fincher 2003-11-11 14:06:19 +00:00
parent 2e0b225d0c
commit e0cfe722c7

View File

@ -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: