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 # Calculations
def calc_ratio(self, unique_ID, torrent_state): def calc_ratio(self, unique_ID, torrent_state):
up = float(torrent_state['total_payload_upload'] + self.unique_IDs[unique_ID].uploaded_memory) up = float((torrent_state['total_payload_upload'] / 1024) + (self.unique_IDs[unique_ID].uploaded_memory / 1024))
down = float(torrent_state["total_done"]) down = float(torrent_state["total_done"] / 1024)
try: try:
ret = float(up/down) ret = float(up/down)