From 5370b66c78016c1af099e57458d67d61a89f3087 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 20 Feb 2010 17:41:10 +0000 Subject: [PATCH] Removed unused code In the very first (0.1) version of the injector we downloaded from local files rather than using HTTP, etc, and some code to support that was still present. --- zeroinstall/injector/download.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/zeroinstall/injector/download.py b/zeroinstall/injector/download.py index ec0141e..178fe9e 100644 --- a/zeroinstall/injector/download.py +++ b/zeroinstall/injector/download.py @@ -217,13 +217,7 @@ if __name__ == '__main__': from urllib2 import urlopen, Request, HTTPError, URLError try: #print "Child downloading", url - if url.startswith('/'): - if not os.path.isfile(url): - print >>sys.stderr, "File '%s' does not " \ - "exist!" % url - return - src = file(url) - elif url.startswith('http:') or url.startswith('https:') or url.startswith('ftp:'): + if url.startswith('http:') or url.startswith('https:') or url.startswith('ftp:'): req = Request(url) if url.startswith('http:') and if_modified_since: req.add_header('If-Modified-Since', if_modified_since) -- 2.11.4.GIT