remove apache python script from commit

This commit is contained in:
Jeff Steinmetz 2015-11-25 23:22:55 -08:00
parent 97a581954f
commit 9a78355390

View file

@ -1,24 +0,0 @@
#! /usr/bin/env python
import sys, argparse
from urllib2 import urlopen
from json import loads
class UsageOnErrorParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('argument error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = UsageOnErrorParser(description='Print preferred Apache mirror URL.')
parser.add_argument('url', type=str, help='Apache mirror selector url.')
args = parser.parse_args()
jsonurl = args.url + '&asjson=1'
body = urlopen(jsonurl).read().decode('utf-8')
mirrors = loads(body)
print(mirrors['preferred'] + mirrors['path_info'])