From: Didier Raboud Date: Mon, 4 Jun 2012 18:13:44 +0000 (+0200) Subject: Accept utf-8 in `apt-cache policy` and `dpkg-query` outputs. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~93 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8cdec4edc6040ec63f95c6d747f30c4a400987d4;p=lsb.git Accept utf-8 in `apt-cache policy` and `dpkg-query` outputs. Reported-by: Frédéric Brière Closes: #675618 --- diff --git a/lsb_release.py b/lsb_release.py index acc56f4..0727c1f 100644 --- a/lsb_release.py +++ b/lsb_release.py @@ -131,7 +131,7 @@ def check_modules_installed(): env=C_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - close_fds=True).communicate()[0].decode('ascii') + close_fds=True).communicate()[0].decode('utf-8') if not output: return [] @@ -205,7 +205,7 @@ def parse_apt_policy(): env=C_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - close_fds=True).communicate()[0].decode('ascii') + close_fds=True).communicate()[0].decode('utf-8') for line in policy.split('\n'): line = line.strip() m = re.match(r'(-?\d+)', line)