From f1b280f6e21d257411e63cbfdf6ccf0085689f9a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 30 Jul 2012 13:23:53 +0200 Subject: apt/auth.py: Do not merge stdout and stderr (Closes: #678706) --- apt/auth.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apt') diff --git a/apt/auth.py b/apt/auth.py index 5d4b1cd6..c52ec3a6 100644 --- a/apt/auth.py +++ b/apt/auth.py @@ -69,7 +69,7 @@ def _call_apt_key_script(*args, **kwargs): proc = subprocess.Popen(cmd, env=env, universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) + stderr=subprocess.PIPE) content = kwargs.get("stdin", None) if isinstance(content, unicode): @@ -77,12 +77,12 @@ def _call_apt_key_script(*args, **kwargs): output, stderr = proc.communicate(content) - assert stderr == None - if proc.returncode: raise SystemError("The apt-key script failed with return code %s:\n" - "%s\n%s" % (proc.returncode, " ".join(cmd), - output)) + "%s\n" + "stdout: %s\n" + "stderr: %s" % (proc.returncode, " ".join(cmd), + output,stderr)) return output.strip() finally: if conf is not None: -- cgit v1.2.3