From 276ee8fee93c07b0f46f009353f1a95423df8749 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 22 Oct 2018 19:14:41 +0200 Subject: [PATCH] Round download progress to two decimals --- platypush/plugins/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/torrent.py b/platypush/plugins/torrent.py index f3c58f68e..a0b6699a6 100644 --- a/platypush/plugins/torrent.py +++ b/platypush/plugins/torrent.py @@ -196,7 +196,7 @@ class TorrentPlugin(Plugin): for i in range(0, torrent_file.files().num_files()) ] - self.torrent_state[torrent]['progress'] = 100 * status.progress + self.torrent_state[torrent]['progress'] = round(100 * status.progress, 2) self.torrent_state[torrent]['download_rate'] = status.download_rate self.torrent_state[torrent]['upload_rate'] = status.upload_rate self.torrent_state[torrent]['num_peers'] = status.num_peers