fix negative ratio bug. maybe :)

This commit is contained in:
Marcos Pinto 2007-06-22 22:31:53 +00:00
parent 2bb0ec122e
commit 7c65bce6d8
1 changed files with 2 additions and 2 deletions

View File

@ -776,8 +776,8 @@ class Manager:
# Calculations
def calc_ratio(self, unique_ID, torrent_state):
up = float(torrent_state['total_payload_upload'] + self.unique_IDs[unique_ID].uploaded_memory)
down = float(torrent_state["total_done"])
up = float((torrent_state['total_payload_upload'] / 1024) + (self.unique_IDs[unique_ID].uploaded_memory / 1024))
down = float(torrent_state["total_done"] / 1024)
try:
ret = float(up/down)