]> git.saurik.com Git - apt.git/blame - cmdline/apt-report-mirror-failure
tests, do not send pkgname with arch via the status-fd
[apt.git] / cmdline / apt-report-mirror-failure
CommitLineData
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
8import sys
9import urllib
10import apt_pkg
11
36280399 12apt_pkg.init()
164fed49 13url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "")
3f599bb7 14 #"http://people.ubuntu.com:9000/mirror-failure")
36280399
MV
15 #"http://localhost:9000/mirror-failure")
16if not url:
17 sys.exit(0)
18
361593e9
MV
19print "Reporting mirror failure to '%s'" % url
20
36280399 21data = {}
f0b509cd
MV
22data['mirror'] = sys.argv[1]
23data['failurl'] = sys.argv[2]
24data['error'] = sys.argv[3]
36280399
MV
25f = urllib.urlopen(url, urllib.urlencode(data))
26f.read()
27f.close()
28
29