]>
Commit | Line | Data |
---|---|---|
36280399 | 1 | #!/usr/bin/python |
23c5897c MV |
2 | # |
3 | # This is a stub that is meant to support failure reporting of | |
4 | # mirrors to a central database | |
5 | # | |
6 | # its currently not used | |
36280399 MV |
7 | |
8 | import sys | |
9 | import urllib | |
10 | import apt_pkg | |
11 | ||
36280399 | 12 | apt_pkg.init() |
164fed49 | 13 | url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "") |
3f599bb7 | 14 | #"http://people.ubuntu.com:9000/mirror-failure") |
36280399 MV |
15 | #"http://localhost:9000/mirror-failure") |
16 | if not url: | |
17 | sys.exit(0) | |
18 | ||
361593e9 MV |
19 | print "Reporting mirror failure to '%s'" % url |
20 | ||
36280399 | 21 | data = {} |
f0b509cd MV |
22 | data['mirror'] = sys.argv[1] |
23 | data['failurl'] = sys.argv[2] | |
24 | data['error'] = sys.argv[3] | |
36280399 MV |
25 | f = urllib.urlopen(url, urllib.urlencode(data)) |
26 | f.read() | |
27 | f.close() | |
28 | ||
29 |