Module: deluge Branch: master Commit: 6ded75caef3d9493ce41d0680e4911acf1277f6e
Author: John Garland <[email protected]> Date: Fri Apr 30 02:20:41 2010 +1000 Remove no longer needed fetch_url --- deluge/common.py | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/deluge/common.py b/deluge/common.py index 985773b..0cde41b 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -406,30 +406,6 @@ def is_magnet(uri): return True return False -def fetch_url(url): - """ - Downloads a torrent file from a given URL and checks the file's validity - - :param url: the url of the .torrent file to fetch - :type url: string - :returns: the filepath to the downloaded file - :rtype: string - - """ - import urllib - from deluge.log import LOG as log - try: - filename, headers = urllib.urlretrieve(url) - except IOError: - log.debug("Network error while trying to fetch torrent from %s", url) - else: - if filename.endswith(".torrent") or headers["content-type"] ==\ - "application/x-bittorrent": - return filename - else: - log.debug("URL doesn't appear to be a valid torrent file: %s", url) - return None - def create_magnet_uri(infohash, name=None, trackers=[]): """ Creates a magnet uri -- 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.
