mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Use self.error() instead of raise for BooleanRequiredFalseOnWindows.
Closes: Sf#3070285
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 0fd6a84632
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
771331232e
commit
a9b515fbd2
@ -259,11 +259,11 @@ conf.registerGlobalValue(conf.supybot.log, 'timestampFormat',
|
|||||||
format."""))
|
format."""))
|
||||||
|
|
||||||
class BooleanRequiredFalseOnWindows(registry.Boolean):
|
class BooleanRequiredFalseOnWindows(registry.Boolean):
|
||||||
|
"""Value cannot be true on Windows"""
|
||||||
def set(self, s):
|
def set(self, s):
|
||||||
registry.Boolean.set(self, s)
|
registry.Boolean.set(self, s)
|
||||||
if self.value and os.name == 'nt':
|
if self.value and os.name == 'nt':
|
||||||
raise registry.InvalidRegistryValue, \
|
self.error()
|
||||||
'Value cannot be true on Windows.'
|
|
||||||
|
|
||||||
conf.registerGlobalValue(conf.supybot.log, 'stdout',
|
conf.registerGlobalValue(conf.supybot.log, 'stdout',
|
||||||
registry.Boolean(True, """Determines whether the bot will log to
|
registry.Boolean(True, """Determines whether the bot will log to
|
||||||
|
Loading…
Reference in New Issue
Block a user