diff options
| author | 2018-10-16 15:09:58 +0100 | |
|---|---|---|
| committer | 2018-10-16 15:09:58 +0100 | |
| commit | 773d11f6cbaa8da91185547b0ab67f3706d735c2 (patch) | |
| tree | c46eb6709985ef7cdfb5bfe9b035fdbdedc4f91f /modules/dice.py | |
| parent | Only log exceptions when they're not unsafe (diff) | |
| signature | ||
Change all instances of stdout.write+return to `raise utils.EventError` in
modules
Diffstat (limited to 'modules/dice.py')
| -rw-r--r-- | modules/dice.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/dice.py b/modules/dice.py index 26adca3e..5e8ddd33 100644 --- a/modules/dice.py +++ b/modules/dice.py @@ -15,12 +15,10 @@ class Module(ModuleManager.BaseModule): results = [] if len(roll) is not 2: - event["stderr"].write(ERROR_FORMAT) - return + raise utils.EventError(ERROR_FORMAT) if roll[0].isdigit() is False or roll[1].isdigit() is False: - event["stderr"].write(ERROR_FORMAT) - return + raise utils.EventError(ERROR_FORMAT) roll = [int(roll[0]), int(roll[1])] |
