summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <egon@tas>2007-01-23 18:43:42 +0100
committerMichael Vogt <egon@tas>2007-01-23 18:43:42 +0100
commitb47081521b0df1f835a2111254fa1fcd77240a85 (patch)
tree2100b9d05756c8c0c5f21191846dd2eae444bf76 /cmdline
parent2769f0bcf6c1ac73e883f47857fa227de92f4525 (diff)
* cmdline/report-mirror-failure
- basic mirror failure script added
Diffstat (limited to 'cmdline')
-rwxr-xr-xcmdline/report-mirror-failure21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmdline/report-mirror-failure b/cmdline/report-mirror-failure
new file mode 100755
index 000000000..8301ed079
--- /dev/null
+++ b/cmdline/report-mirror-failure
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+import sys
+import urllib
+import apt_pkg
+
+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()
+
+