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