summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-10-23 12:37:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-10-23 12:37:49 +0200
commit6bd628c370b05b80b59552e4bbc970928aca91a1 (patch)
tree80ebcac7fc698d3fd70afdffcf01cf05ba5f3b7f /apt
parent870bf6095484206655f58753a12430da4569645c (diff)
downloadpython-apt-6bd628c370b05b80b59552e4bbc970928aca91a1.tar.gz
build fixes for python3.3
Diffstat (limited to 'apt')
-rw-r--r--apt/auth.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt/auth.py b/apt/auth.py
index eff13b1a..c1b8da2a 100644
--- a/apt/auth.py
+++ b/apt/auth.py
@@ -78,7 +78,8 @@ def _call_apt_key_script(*args, **kwargs):
stderr=subprocess.PIPE)
content = kwargs.get("stdin", None)
- if isinstance(content, unicode):
+ # py2 needs this encoded, py3.3 will crash if it is
+ if isinstance(content, unicode) and sys.version_info[:2] < (3, 3):
content = content.encode("utf-8")
output, stderr = proc.communicate(content)