Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-03-05 18:03:07 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-03-05 18:06:47 (GMT)
commit392ccca583c46b75abd73ea946d42aac588e4006 (patch)
tree21d2851e80535216905397a34f871bf11e0f4f40
parent141d04694d9dd0a806049d38a3328cceefd87249 (diff)
Don't set path in the downloader
-rw-r--r--readactivity.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/readactivity.py b/readactivity.py
index 76182ed..19ab4e1 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -843,7 +843,7 @@ class ReadActivity(activity.Activity):
self._progress_alert = None
GObject.idle_add(self._get_document)
- def _download_document(self, tube_id, path):
+ def _download_document(self, tube_id):
# FIXME: should ideally have the CM listen on a Unix socket
# instead of IPv4 (might be more compatible with Rainbow)
chan = self.shared_activity.telepathy_tubes_chan
@@ -867,8 +867,7 @@ class ReadActivity(activity.Activity):
getter.connect("finished", self._download_result_cb, tube_id)
getter.connect("progress", self._download_progress_cb, tube_id)
getter.connect("error", self._download_error_cb, tube_id)
- _logger.debug("Starting download to %s...", path)
- getter.start(path)
+ getter.start()
self._download_content_length = getter.get_content_length()
self._download_content_type = getter.get_content_type()
return False
@@ -877,13 +876,6 @@ class ReadActivity(activity.Activity):
if not self._want_document:
return False
- # Assign a file path to download if one doesn't exist yet
- if not self._jobject.file_path:
- path = os.path.join(self.get_activity_root(), 'instance',
- 'tmp%i' % time.time())
- else:
- path = self._jobject.file_path
-
# Pick an arbitrary tube we can try to download the document from
try:
tube_id = self.unused_download_tubes.pop()
@@ -894,7 +886,7 @@ class ReadActivity(activity.Activity):
# Avoid trying to download the document multiple times at once
self._want_document = False
- GObject.idle_add(self._download_document, tube_id, path)
+ GObject.idle_add(self._download_document, tube_id)
return False
def _joined_cb(self, also_self):