]> git.saurik.com Git - apt.git/blame_incremental - cmdline/apt-report-mirror-failure
demote VectorizeString gcc attribute from const to pure
[apt.git] / cmdline / apt-report-mirror-failure
... / ...
CommitLineData
1#!/usr/bin/python
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
7
8import sys
9import urllib
10import apt_pkg
11
12apt_pkg.init()
13url = apt_pkg.Config.find("Acquire::Mirror::ReportFailures", "")
14 #"http://people.ubuntu.com:9000/mirror-failure")
15 #"http://localhost:9000/mirror-failure")
16if not url:
17 sys.exit(0)
18
19print "Reporting mirror failure to '%s'" % url
20
21data = {}
22data['mirror'] = sys.argv[1]
23data['failurl'] = sys.argv[2]
24data['error'] = sys.argv[3]
25f = urllib.urlopen(url, urllib.urlencode(data))
26f.read()
27f.close()
28
29