Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/downloadmanager.py
diff options
context:
space:
mode:
authorSascha Silbe <silbe@activitycentral.com>2011-05-21 12:12:10 (GMT)
committer Sascha Silbe <silbe@activitycentral.com>2011-05-21 12:24:25 (GMT)
commit14da529ec77941a93ed3066ed02a10113ffe31d5 (patch)
tree8e9e741410c0d0d3a08296143a1f40f5ac2a7bbd /downloadmanager.py
parent7964449b0be7f941a533013b558a404db7873398 (diff)
fix PEP8 whitespace issues
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Diffstat (limited to 'downloadmanager.py')
-rw-r--r--downloadmanager.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/downloadmanager.py b/downloadmanager.py
index 90d22a5..a71f16e 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -166,7 +166,8 @@ class Download:
_active_downloads.append(self)
elif state_flags & interfaces.nsIWebProgressListener.STATE_STOP:
- if NS_FAILED(status): # download cancelled
+ if NS_FAILED(status):
+ # download cancelled
return
self._stop_alert = Alert()
@@ -237,6 +238,7 @@ class Download:
gtk.gdk.INTERP_BILINEAR)
preview_data = []
+
def save_func(buf, data):
data.append(buf)
@@ -287,7 +289,7 @@ class Download:
def onProgressChange64(self, web_progress, request, cur_self_progress,
max_self_progress, cur_total_progress,
max_total_progress):
- percent = (cur_self_progress * 100) / max_self_progress
+ percent = (cur_self_progress * 100) / max_self_progress
if (time.time() - self._last_update_time) < _MIN_TIME_UPDATE and \
(percent - self._last_update_percent) < _MIN_PERCENT_UPDATE:
@@ -343,7 +345,7 @@ class Download:
global _active_downloads
if self in _active_downloads:
# TODO: Use NS_BINDING_ABORTED instead of NS_ERROR_FAILURE.
- self.cancelable.cancel(NS_ERROR_FAILURE) #NS_BINDING_ABORTED)
+ self.cancelable.cancel(NS_ERROR_FAILURE)
_active_downloads.remove(self)
@@ -442,4 +444,4 @@ class _SaveLinkProgressListener(object):
def onDataAvailable(self, request, context, inputStream, offset, count):
self._external_listener.onDataAvailable(request, context, inputStream,
- offset, count);
+ offset, count)