src/log.py: Fix a NameError in a Windows specific section of the code.

This commit is contained in:
James Vega 2006-05-05 02:13:41 +00:00
parent a64f4e445b
commit 514ddbc74f

View File

@ -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)