From 91c6e1d29f58b370460489b0d609f4f2d4b52d2a Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 14 Mar 2014 22:25:19 +0100 Subject: [PATCH] Don't log bytes in status. --- linkcheck/director/console.py | 5 +---- linkcheck/director/status.py | 4 +--- linkcheck/gui/__init__.py | 4 +--- linkcheck/gui/logger.py | 6 ++---- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/linkcheck/director/console.py b/linkcheck/director/console.py index 6b06f996..f4cd42e1 100644 --- a/linkcheck/director/console.py +++ b/linkcheck/director/console.py @@ -42,8 +42,7 @@ class StatusLogger (object): """Save file descriptor for logging.""" self.fd = fd - def log_status (self, checked, in_progress, queue, duration, - downloaded_bytes): + def log_status (self, checked, in_progress, queue, duration): """Write status message to file descriptor.""" msg = _n("%2d thread active", "%2d threads active", in_progress) % \ in_progress @@ -53,8 +52,6 @@ class StatusLogger (object): msg = _n("%4d link checked", "%4d links checked", checked) % checked self.write(u"%s, " % msg) msg = _("runtime %s") % strformat.strduration_long(duration) - self.write(u"%s, " % msg) - msg = _("downloaded %s") % strformat.strsize(downloaded_bytes) self.writeln(msg) self.flush() diff --git a/linkcheck/director/status.py b/linkcheck/director/status.py index 1efbf11d..b5401361 100644 --- a/linkcheck/director/status.py +++ b/linkcheck/director/status.py @@ -54,6 +54,4 @@ class Status (task.LoggedCheckedTask): """Log a status message.""" duration = time.time() - self.start_time checked, in_progress, queue = self.aggregator.urlqueue.status() - downloaded_bytes = self.aggregator.downloaded_bytes - self.logger.log_status(checked, in_progress, queue, duration, - downloaded_bytes) + self.logger.log_status(checked, in_progress, queue, duration) diff --git a/linkcheck/gui/__init__.py b/linkcheck/gui/__init__.py index 274078ed..01cd023b 100644 --- a/linkcheck/gui/__init__.py +++ b/linkcheck/gui/__init__.py @@ -569,13 +569,11 @@ Version 2 or later. """Show given link in status bar.""" self.statusBar.showMessage(link) - def log_status (self, checked, in_progress, queued, duration, - downloaded_bytes): + def log_status (self, checked, in_progress, queued, duration): """Update number of checked, active and queued links.""" self.label_checked.setText(u"%d" % checked) self.label_active.setText(u"%d" % in_progress) self.label_queued.setText(u"%d" % queued) - # XXX display downloaded bytes def log_stats (self, statistics): """Set statistic information for selected URL.""" diff --git a/linkcheck/gui/logger.py b/linkcheck/gui/logger.py index 83b5a283..73adff1b 100644 --- a/linkcheck/gui/logger.py +++ b/linkcheck/gui/logger.py @@ -68,8 +68,6 @@ class StatusLogger (object): """Store given signal object.""" self.signal = signal - def log_status (self, checked, in_progress, queued, duration, - downloaded_bytes): + def log_status (self, checked, in_progress, queued, duration): """Emit signal with given status information.""" - self.signal.emit(checked, in_progress, queued, duration, - downloaded_bytes) + self.signal.emit(checked, in_progress, queued, duration)