summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/auth.py14
-rw-r--r--apt/progress/base.py2
2 files changed, 10 insertions, 6 deletions
diff --git a/apt/auth.py b/apt/auth.py
index 5d4b1cd6..e088ae85 100644
--- a/apt/auth.py
+++ b/apt/auth.py
@@ -28,6 +28,7 @@ import atexit
import os
import os.path
import subprocess
+import sys
import tempfile
import apt_pkg
@@ -69,7 +70,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 +78,15 @@ 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))
+ elif stderr:
+ sys.stderr.write(stderr) # Forward stderr
+
return output.strip()
finally:
if conf is not None:
diff --git a/apt/progress/base.py b/apt/progress/base.py
index ab57dd82..2c80ae29 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -65,7 +65,7 @@ class AcquireProgress(object):
def media_change(self, media, drive):
"""Prompt the user to change the inserted removable media.
- The parameter 'media' decribes the name of the the media type that
+ The parameter 'media' decribes the name of the media type that
should be changed, whereas the parameter 'drive' should be the
identifying name of the drive whose media should be changed.