mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-22 18:14:41 +01:00
Fixed some uselessness in log.MetaFirewall and removed an attribute that shouldn't be firewalled (it was vestigial).
This commit is contained in:
parent
44c2f08638
commit
2861b5a334
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user