From 28bbad1586dda512ae28b88e5010f44cbd19846b Mon Sep 17 00:00:00 2001 From: j Date: Tue, 23 Feb 2016 23:31:58 +0530 Subject: [PATCH] remove unused code --- oml/nodes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/oml/nodes.py b/oml/nodes.py index 36689a3..a22b06b 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -37,7 +37,6 @@ class Node(Thread): host = None local = None _online = None - download_speed = 0 TIMEOUT = 5 def __init__(self, nodes, user): @@ -281,7 +280,6 @@ class Node(Thread): def download(self, item): self.resolve() url = '%s/get/%s' % (self.url, item.id) - t1 = datetime.utcnow() if DEBUG_NODES: logger.debug('download %s', url) self._opener.addheaders = list(zip(self.headers.keys(), self.headers.values())) @@ -333,10 +331,6 @@ class Node(Thread): if state.bandwidth: while not state.bandwidth.download(chunk_size) and not state.shutdown: time.sleep(0.1) - t2 = datetime.utcnow() - duration = (t2-t1).total_seconds() - if duration: - self.download_speed = size / duration return item.save_file(content) except: logger.debug('download failed %s', url, exc_info=True)