mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 23:09:23 +01:00
pr/inspircd: catch KeyError only in the function lookup, not the function call!
This suppressed KeyErrors in execution... BAD
This commit is contained in:
parent
dafeff6324
commit
2ecaab1586
@ -419,9 +419,10 @@ def handle_events(irc, data):
|
|||||||
# We will do wildcard event handling here. Unhandled events are just ignored.
|
# We will do wildcard event handling here. Unhandled events are just ignored.
|
||||||
try:
|
try:
|
||||||
func = globals()['handle_'+command.lower()]
|
func = globals()['handle_'+command.lower()]
|
||||||
parsed_args = func(irc, numeric, command, args)
|
|
||||||
except KeyError: # unhandled event
|
except KeyError: # unhandled event
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
parsed_args = func(irc, numeric, command, args)
|
||||||
else:
|
else:
|
||||||
# Only call our hooks if there's data to process. Handlers that support
|
# Only call our hooks if there's data to process. Handlers that support
|
||||||
# hooks will return a dict of parsed arguments, which can be passed on
|
# hooks will return a dict of parsed arguments, which can be passed on
|
||||||
|
Loading…
Reference in New Issue
Block a user