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
1 changed files with 1 additions and 1 deletions

View File

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