From 773d11f6cbaa8da91185547b0ab67f3706d735c2 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 16 Oct 2018 15:09:58 +0100 Subject: Change all instances of stdout.write+return to `raise utils.EventError` in modules --- modules/dice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/dice.py') 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])] -- cgit v1.3.1-10-gc9f91