summaryrefslogtreecommitdiff
path: root/cmdline/apt-report-mirror-failure
diff options
context:
space:
mode:
authorMichael Vogt <egon@tas>2007-02-01 12:32:50 +0100
committerMichael Vogt <egon@tas>2007-02-01 12:32:50 +0100
commit36280399db0ae203d3f1ae4d44b946f31e9a38ce (patch)
tree79cba67d2c395b54d2b2ff5863de00ffeab4fdda /cmdline/apt-report-mirror-failure
parent362d29343e5d25248bcd84300aa1b18effe891e7 (diff)
* commited the latest mirror failure detection code
Diffstat (limited to 'cmdline/apt-report-mirror-failure')
-rwxr-xr-xcmdline/apt-report-mirror-failure23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmdline/apt-report-mirror-failure b/cmdline/apt-report-mirror-failure
new file mode 100755
index 000000000..70b16cf4f
--- /dev/null
+++ b/cmdline/apt-report-mirror-failure
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import sys
+import urllib
+import apt_pkg
+
+print "apt-report-mirror-failure"
+
+apt_pkg.init()
+url = apt_pkg.Config.Find("Acquire::Mirror::ReportFailures",
+ "http://people.ubuntu.com:9000/mirror-failure")
+ #"http://localhost:9000/mirror-failure")
+if not url:
+ sys.exit(0)
+
+data = {}
+data['url'] = sys.argv[1]
+data['error'] = sys.argv[2]
+f = urllib.urlopen(url, urllib.urlencode(data))
+f.read()
+f.close()
+
+