diff options
-rw-r--r-- | MgaRepo/commands/maintdb.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MgaRepo/commands/maintdb.py b/MgaRepo/commands/maintdb.py index ad830b4..c926ec2 100644 --- a/MgaRepo/commands/maintdb.py +++ b/MgaRepo/commands/maintdb.py @@ -33,9 +33,10 @@ def parse_options(): def maintdb(maintdb_args): host = config.get("maintdb", "host", "maintdb.mageia.org") if (maintdb_args[0] == 'get' and len(maintdb_args)>=2): + url = config.get("maintdb", "url", "http://maintdb.mageia.org/") import urllib.request try: - page=urllib.request.urlopen('http://'+host+'/'+maintdb_args[1]) + page=urllib.request.urlopen(url + maintdb_args[1]) rep = page.read().decode('utf8') except urllib.error.HTTPError as e: if e.code == 404 : |