diff options
Diffstat (limited to 'MgaRepo')
-rw-r--r-- | MgaRepo/svn.py | 4 | ||||
-rw-r--r-- | MgaRepo/util.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/MgaRepo/svn.py b/MgaRepo/svn.py index 5254ab1..ce5fccd 100644 --- a/MgaRepo/svn.py +++ b/MgaRepo/svn.py @@ -41,12 +41,12 @@ class SVN: except Error as e: msg = None if e.args: - if "Permission denied" in e.args[0]: + if b"Permission denied" in e.args[0]: msg = ("It seems ssh-agent or ForwardAgent are not setup " "or your username is wrong. See " "https://wiki.mageia.org/en/Packagers_ssh" " for more information.") - elif "authorization failed" in e.args[0]: + elif b"authorization failed" in e.args[0]: msg = ("Note that mgarepo does not support any HTTP " "authenticated access.") if kwargs.get("show") and \ diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 1971918..86fa071 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -30,11 +30,11 @@ def execcmd(*cmd, **kwargs): if kwargs.get("geterr"): err = BytesIO() pstdin = kwargs.get("stdin") if kwargs.get("stdin") else None - pipe = subprocess.Popen(cmdstr, shell=True, + p = subprocess.Popen(cmdstr, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=pstdin) - of = pipe.stdout.fileno() - ef = pipe.stderr.fileno() + of = p.stdout.fileno() + ef = p.stderr.fileno() while True: r,w,x = select.select((of,ef), (), ()) odata = None @@ -48,8 +48,8 @@ def execcmd(*cmd, **kwargs): err.write(edata) sys.stderr.buffer.write(edata) - status = pipe.poll() - if status is not None and odata == "" and edata == "": + status = p.poll() + if status is not None and odata == b'' and edata == b'': break output = err.getvalue() else: |