diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-23 12:41:37 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-23 12:41:37 +0200 |
| commit | b485b22c8d4caf3e22c65a4b426137d68b8404af (patch) | |
| tree | f5fd0ac1890e7e127ad59ec06c76d14dde3f1e1c /apt/auth.py | |
| parent | 9f4b8cb3fbf1be70aa22811aad3880306b77058b (diff) | |
| parent | 6bd628c370b05b80b59552e4bbc970928aca91a1 (diff) | |
| download | python-apt-b485b22c8d4caf3e22c65a4b426137d68b8404af.tar.gz | |
merged from the mvo branch
Diffstat (limited to 'apt/auth.py')
| -rw-r--r-- | apt/auth.py | 3 |
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) |
