src/conf.py: Use classic comparison instead of str.translate.

This commit is contained in:
Valentin Lorentz 2012-08-04 22:47:16 +02:00
parent 0b7e4e5ce5
commit 0c99a65afa

View File

@ -456,7 +456,7 @@ registerChannelValue(supybot.reply, 'showSimpleSyntax',
class ValidPrefixChars(registry.String): class ValidPrefixChars(registry.String):
"""Value must contain only ~!@#$%^&*()_-+=[{}]\\|'\";:,<.>/?""" """Value must contain only ~!@#$%^&*()_-+=[{}]\\|'\";:,<.>/?"""
def setValue(self, v): def setValue(self, v):
if v.translate(utils.str.chars, '`~!@#$%^&*()_-+=[{}]\\|\'";:,<.>/?'): if any([x not in '`~!@#$%^&*()_-+=[{}]\\|\'";:,<.>/?' for x in v]):
self.error() self.error()
registry.String.setValue(self, v) registry.String.setValue(self, v)