Lines Matching refs:filename
119 def validate_container(filename, hash):
124 file = open(filename, 'r')
126 printIOError(e, "Can't open file " + filename)
131 def validate_payload(filename, hash):
143 if expr_bz.match(filename):
144 file = bz2.BZ2File(filename, 'r')
145 elif expr_gz.match(filename):
146 file = gzip.GzipFile(filename, 'r')
147 elif expr_tgz.match(filename):
148 file = gzip.GzipFile(filename, 'r')
152 printIOError(e, "Can't open archive " + filename)
156 def download(url, timeout, filename=None, quiet=False):
157 """Download the content at the given URL to the given filename
177 if filename == None:
178 filename = src.geturl().split('/')[-1]
181 dst = open(filename, 'wb');
184 printIOError(e, "Can't open file " + filename + " for writing")
198 return filename
200 def pypi_url(url, filename):
208 The filename argument is the name of the expected file to download, so
250 if archiveurl.endswith("/%s" % os.path.basename(filename)):
254 print "None of the following URLs delivers '%s':" % filename
260 def download_paths(search, filename, url):
261 """Returns a list of URLs where the file 'filename' might be found,
264 If 'filename' is None, then the list will simply contain 'url'.
269 if filename != None:
274 file = os.path.basename(filename)
278 # filename should always be first
279 if filename in urls:
280 urls.remove(filename)
281 urls.insert(0, filename)