mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
src/log.py: Fix a NameError in a Windows specific section of the code.
This commit is contained in:
parent
a64f4e445b
commit
514ddbc74f
@ -233,7 +233,8 @@ class BooleanRequiredFalseOnWindows(registry.Boolean):
|
|||||||
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 InvalidRegistryValue, 'Value cannot be true on Windows.'
|
raise registry.InvalidRegistryValue, \
|
||||||
|
'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
|
||||||
@ -334,7 +335,7 @@ class MetaFirewall(type):
|
|||||||
for attr in dict['__firewalled__']:
|
for attr in dict['__firewalled__']:
|
||||||
try:
|
try:
|
||||||
errorHandler = firewalled[attr]
|
errorHandler = firewalled[attr]
|
||||||
except: # This is raw here so people can still use tuples.
|
except: # This is raw here so people can still use tuples.
|
||||||
errorHandler = None
|
errorHandler = None
|
||||||
dict[attr] = firewall(dict[attr], errorHandler)
|
dict[attr] = firewall(dict[attr], errorHandler)
|
||||||
return super(MetaFirewall, cls).__new__(cls, name, bases, dict)
|
return super(MetaFirewall, cls).__new__(cls, name, bases, dict)
|
||||||
|
Loading…
Reference in New Issue
Block a user