diff options
author | Papoteur <papoteur@mageia.org> | 2019-02-27 09:17:52 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2019-02-27 09:17:52 +0100 |
commit | c07a59d51f0121dcf3738324e590263f3a348bea (patch) | |
tree | fe1db24c6ccb91c72deb4a847b1390ed7fc476af /MgaRepo/commands | |
parent | 7b9fed841bba9e7fc390603db7bc789f4829d627 (diff) | |
download | mgarepo-c07a59d51f0121dcf3738324e590263f3a348bea.tar mgarepo-c07a59d51f0121dcf3738324e590263f3a348bea.tar.gz mgarepo-c07a59d51f0121dcf3738324e590263f3a348bea.tar.bz2 mgarepo-c07a59d51f0121dcf3738324e590263f3a348bea.tar.xz mgarepo-c07a59d51f0121dcf3738324e590263f3a348bea.zip |
Use url option instead of host for maintdb get
Diffstat (limited to 'MgaRepo/commands')
-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 : |