Fixed some uselessness in log.MetaFirewall and removed an attribute that shouldn't be firewalled (it was vestigial).

This commit is contained in:
Jeremy Fincher 2005-05-15 16:50:10 +00:00
parent 44c2f08638
commit 2861b5a334
2 changed files with 8 additions and 10 deletions

View File

@ -75,7 +75,9 @@ class IrcCallback(IrcCommandDispatcher):
'__lt__': lambda self: 0,
'inFilter': lambda self, irc, msg: msg,
'outFilter': lambda self, irc, msg: msg,
'name': lambda self: self.__class__.__name__,}
'name': lambda self: self.__class__.__name__,
'callPrecedence': lambda self, irc: ([], []),
}
def __init__(self, *args, **kwargs):
super(IrcCallback, self).__init__(*args, **kwargs)

View File

@ -331,13 +331,9 @@ def firewall(f, errorHandler=None):
class MetaFirewall(type):
def __new__(cls, name, bases, dict):
firewalled = {}
for base in bases:
if hasattr(base, '__firewalled__'):
firewalled.update(base.__firewalled__)
if '__firewalled__' in dict:
firewalled.update(dict['__firewalled__'])
for attr in firewalled:
if attr in dict:
try:
errorHandler = firewalled[attr]
except: