diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-03 17:43:02 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-09 16:51:03 +0100 |
| commit | 72f64550fac8dac5f1e0cbcc52c5700ae97f1024 (patch) | |
| tree | 7b6b22abc832c7043b1e408e4d110bca39e7e6fa | |
| parent | 1e70503c405029e610fad115ab233a2e27bfd0a7 (diff) | |
| download | geldschieberbot-72f64550fac8dac5f1e0cbcc52c5700ae97f1024.tar.gz geldschieberbot-72f64550fac8dac5f1e0cbcc52c5700ae97f1024.zip | |
call abs() before to_euro()
| -rw-r--r-- | geldschieberbot.py | 4 |
1 files 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": |
