summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-04-09 16:49:33 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-04-09 16:49:33 +0000
commit73f0c5a8d83c64a673f7f196076327905d2c3521 (patch)
treeef90833ee29add7223d7ef66fb794edeae3026e1 /install
parent6833313d7ac77c3538a1fe0249eb0d06e11ffa27 (diff)
downloadlive-73f0c5a8d83c64a673f7f196076327905d2c3521.tar.gz
Stronger check APT mirror (remember example.com ;-)
Diffstat (limited to 'install')
-rwxr-xr-xinstall5
1 files changed, 4 insertions, 1 deletions
diff --git a/install b/install
index fa910e3..7497027 100755
--- a/install
+++ b/install
@@ -415,7 +415,10 @@ def valid_mirror(mirror):
try:
o = urlopen('{mirror}/dists/{codename}/Release'.format(
mirror=mirror, codename=codename), timeout=10)
- return True
+ for line in o.read(400).split('\n'):
+ if line.strip() == 'Codename: ' + codename:
+ return True
+ raise URLError('Not an APT repository')
except HTTPError as e:
ButtonChoiceWindow(screen,
title='Error',