summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2019-02-26 07:48:03 +0100
committerHelmut Grohne <helmut@subdivi.de>2019-02-26 07:48:03 +0100
commitfee81e86d0bda64b6a5b82c46273b7e9980b23bd (patch)
tree5642fa8eedfab19519bd03f61e3d8ed69c55c21a
parentb7ad460982117dc1f9ba101d00d4c2af1bb8c639 (diff)
downloadcrossqa-fee81e86d0bda64b6a5b82c46273b7e9980b23bd.tar.gz
depcheck.py: make the mirror configurable
-rwxr-xr-xdepcheck.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/depcheck.py b/depcheck.py
index 4089ec5..7f47a58 100755
--- a/depcheck.py
+++ b/depcheck.py
@@ -1,5 +1,6 @@
#!/usr/bin/python3
+import argparse
import collections
import contextlib
import datetime
@@ -20,7 +21,6 @@ import requests
from common import decompress_stream, yield_lines
BUILD_ARCH = "amd64"
-MIRROR = "http://proxy:3142/debian"
PROFILES = frozenset(("cross", "nocheck"))
CPUEntry = collections.namedtuple('CPUEntry',
@@ -431,7 +431,12 @@ def update_depcheck(mirror, db, architecture):
db.commit()
def main():
- mirror = DebianMirror(MIRROR)
+ argp = argparse.ArgumentParser()
+ argp.add_argument('-m', '--mirror',
+ default='http://deb.debian.org/debian',
+ help="debian mirror to use")
+ args = argp.parse_args()
+ mirror = DebianMirror(args.mirror)
mirror.update_release()
db = sqlite3.connect("db", detect_types=sqlite3.PARSE_DECLTYPES)
cur = db.cursor()