Use self.error() instead of raise for BooleanRequiredFalseOnWindows.

Closes: Sf#3070285
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2010-09-20 18:34:07 -04:00
parent 074ded49e4
commit 0fd6a84632

View File

@ -259,11 +259,11 @@ conf.registerGlobalValue(conf.supybot.log, 'timestampFormat',
format."""))
class BooleanRequiredFalseOnWindows(registry.Boolean):
"""Value cannot be true on Windows"""
def set(self, s):
registry.Boolean.set(self, s)
if self.value and os.name == 'nt':
raise registry.InvalidRegistryValue, \
'Value cannot be true on Windows.'
self.error()
conf.registerGlobalValue(conf.supybot.log, 'stdout',
registry.Boolean(True, """Determines whether the bot will log to