Skip to content

Commit 998d3b4

Browse files
committed
fix unprotected access
1 parent e0037da commit 998d3b4

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Monika After Story/game/zz_submods.rpy

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,14 @@ init -980 python in mas_submod_utils:
483483
"""
484484
global function_plugins
485485

486-
func_dict = function_plugins.get(key)
487-
488-
if not func_dict:
489-
return
490-
491-
return func_dict.get(_function)[0]
486+
try:
487+
return function_plugins[key][_function][0]
488+
489+
except KeyError:
490+
# Unknown key/function
491+
# We do not handle index error as that shouldn't be possible
492+
# and means there's a bug in the system
493+
return None
492494

493495
@mas_utils.deprecated(
494496
use_instead="functools.partial",

0 commit comments

Comments
 (0)