From c07a59d51f0121dcf3738324e590263f3a348bea Mon Sep 17 00:00:00 2001 From: Papoteur Date: Wed, 27 Feb 2019 09:17:52 +0100 Subject: Use url option instead of host for maintdb get --- MgaRepo/commands/maintdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MgaRepo') 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 : -- cgit v1.2.1