diff options
| author | 2019-06-14 12:48:26 +0100 | |
|---|---|---|
| committer | 2019-06-14 12:48:26 +0100 | |
| commit | 3fad17d1b98cb3dcc20fad17420897005f02131d (patch) | |
| tree | 39d3ccaba5b52098b018975b01e9cab30400347a /modules | |
| parent | Remove !set/!channelset/!serverset/!botset and related commands (diff) | |
| signature | ||
catch StopIteration.value, pass back EventError that comes from a generator
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 69b7201c..6c96a854 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -174,8 +174,8 @@ class Module(ModuleManager.BaseModule): try: next_success, next_return = self._hook_call_catch( lambda: next(hook_return)) - except StopIteration: - break + except StopIteration as e: + return True, e.value if next_success: multi_check = None @@ -191,7 +191,7 @@ class Module(ModuleManager.BaseModule): if not check_success: return False, check_message else: - break + return False, next_return return hook_success, hook_return def command(self, server, target, target_str, is_channel, user, command, |
