]>
Commit | Line | Data |
---|---|---|
36280399 MV |
1 | #!/usr/bin/python |
2 | ||
3 | import sys | |
4 | import urllib | |
5 | import apt_pkg | |
6 | ||
36280399 | 7 | apt_pkg.init() |
3f599bb7 MV |
8 | url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None) |
9 | #"http://people.ubuntu.com:9000/mirror-failure") | |
36280399 MV |
10 | #"http://localhost:9000/mirror-failure") |
11 | if not url: | |
12 | sys.exit(0) | |
13 | ||
361593e9 MV |
14 | print "Reporting mirror failure to '%s'" % url |
15 | ||
36280399 | 16 | data = {} |
f0b509cd MV |
17 | data['mirror'] = sys.argv[1] |
18 | data['failurl'] = sys.argv[2] | |
19 | data['error'] = sys.argv[3] | |
36280399 MV |
20 | f = urllib.urlopen(url, urllib.urlencode(data)) |
21 | f.read() | |
22 | f.close() | |
23 | ||
24 |