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)