From bb448f412dae3b25dfdbec7eca0fa2916e8a799c Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Mon, 8 May 2017 18:50:27 +0200 Subject: [PATCH] Math: Fix round() with single argument in 'calc' command I broke this with my previous commit related to this. --- plugins/Math/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index 532eb3745..293f3acc8 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -120,7 +120,7 @@ class Math(callbacks.Plugin): _mathEnv['abs'] = abs _mathEnv['max'] = max _mathEnv['min'] = min - _mathEnv['round'] = lambda x, y: round(x, int(y)) + _mathEnv['round'] = lambda x, y=0: round(x, int(y)) _mathSafeEnv = dict([(x,y) for x,y in _mathEnv.items()]) _mathSafeEnv['factorial'] = _factorial _mathRe = re.compile(r'((?:(?