From 72f64550fac8dac5f1e0cbcc52c5700ae97f1024 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 3 Nov 2017 17:43:02 +0100 Subject: call abs() before to_euro() --- geldschieberbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geldschieberbot.py b/geldschieberbot.py index 33115e9..bd20e11 100644 --- a/geldschieberbot.py +++ b/geldschieberbot.py @@ -46,7 +46,7 @@ def create_summary(user): if amount == 0: continue total -= amount - summary += "\t{} {} {}\n".format("<-" if amount < 0 else "->", person, abs(to_euro(amount))) + summary += "\t{} {} {}\n".format("<-" if amount < 0 else "->", person, to_euro(abs(amount))) if summary == "": summary = "\tAll fine :)\n" else: @@ -213,7 +213,7 @@ def handle_input(inp): send("New Balance: {0} {1} {2:.2} {3}\n".format(sender, ("->" if p_balance > 0 else "<-"), - abs(to_euro(p_balance)), + to_euro(abs(p_balance)), recipient)) elif cmd == "!tanken": -- cgit v1.2.3