mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Added an assert for easier debugging.
This commit is contained in:
parent
2e0b225d0c
commit
e0cfe722c7
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user