diff options
Diffstat (limited to 'cmdline/apt-report-mirror-failure')
-rwxr-xr-x | cmdline/apt-report-mirror-failure | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure new file mode 100755 index 000000000..1567e78e3 --- /dev/null +++ b/cmdline/apt-report-mirror-failure @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import sys +import urllib +import apt_pkg + +apt_pkg.init() +url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures", None) + #"http://people.ubuntu.com:9000/mirror-failure") + #"http://localhost:9000/mirror-failure") +if not url: + sys.exit(0) + +print "Reporting mirror failure to '%s'" % url + +data = {} +data['mirror'] = sys.argv[1] +data['failurl'] = sys.argv[2] +data['error'] = sys.argv[3] +f = urllib.urlopen(url, urllib.urlencode(data)) +f.read() +f.close() + + |