From 6bd628c370b05b80b59552e4bbc970928aca91a1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 23 Oct 2012 12:37:49 +0200 Subject: build fixes for python3.3 --- apt/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt') 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) -- cgit v1.2.3