From 6e4f34e9d8f24fe21228dd54dbf8ea2302d7969e Mon Sep 17 00:00:00 2001 From: NEMESIS13cz Date: Sun, 13 Sep 2015 02:51:50 +0200 Subject: [PATCH] Fixed error tracing --- calc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/calc.py b/calc.py index 8ac48f0..ed6ae12 100644 --- a/calc.py +++ b/calc.py @@ -10,6 +10,12 @@ calc_perm = "utils.calc" calc_perm_power = "utils.calc.power" def calc(sender, text): + try: + do_calc(sender, text) + except: + return + +def do_calc(sender, text): """ extracts a mathematical expression from `text` returns (expression, result) or None