Author: damoxc
Revision: 5501
Log:
just return the deferred created by httpdownloader
Diff:
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py 2009-07-20 08:20:17 UTC (rev 5500)
+++ trunk/deluge/ui/web/json_api.py 2009-07-20 08:39:46 UTC (rev 5501)
@@ -441,13 +441,11 @@
"""
tmp_file = os.path.join(tempfile.gettempdir(), url.split("/")[-1])
- d = Deferred()
- httpdownloader.download_file(url,
tmp_file).addCallback(self._on_torrent_downloaded, tmp_file, d)
- return d
+ return httpdownloader.download_file(url,
tmp_file).addCallback(self._on_torrent_downloaded, tmp_file)
- def _on_torrent_downloaded(self, result, filename, d):
+ def _on_torrent_downloaded(self, result, filename):
log.debug("filename: %s", filename)
- d.callback(filename)
+ return filename
@export
def get_torrent_info(self, filename):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---