diff options
Diffstat (limited to 'MgaRepo/util.py')
-rw-r--r-- | MgaRepo/util.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 6d31399..519c199 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -20,15 +20,15 @@ def commands_getstatusoutput(cmd): """Return (status, output) of executing cmd in a shell.""" pipe = subprocess.Popen('{ ' + cmd + '; } 2>&1', stdin = subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines = True, shell = True) of = pipe.stdout.fileno() - text = '' + text = b'' pipe.stdin.close() while True: - text += os.read(of,8192).decode('utf8') + text += os.read(of,8192) status = pipe.poll() if status is not None or text == '': break if text[-1:] == '\n': text = text[:-1] - return status, text + return status, text.decode('utf8') def execcmd(*cmd, **kwargs): cmdstr = " ".join(cmd) @@ -179,7 +179,7 @@ def rellink(src, dst): def maintdb_get(package): dlurl = config.get("maintdb", "url", - "http://maintdb.mageia.org/") + "https://maintdb.mageia.org/") dlurl = dlurl + "/" + package h = httplib2.Http() resp, content = h.request(dlurl, 'GET') |