diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-01-17 13:22:34 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-01-17 13:22:34 +0100 |
| commit | 773c5de21c809c7fe07eefafa252efa0b6758744 (patch) | |
| tree | 2e3344e061a7ab275437c2b4fcf50898ae811b75 /aptsources/distro.py | |
| parent | 875d039bdfa15a02968ab8188584fae790a92d5f (diff) | |
| download | python-apt-773c5de21c809c7fe07eefafa252efa0b6758744.tar.gz | |
aptsources/distro.py: Support Python 3, decode lsb_release results using utf-8.
Diffstat (limited to 'aptsources/distro.py')
| -rw-r--r-- | aptsources/distro.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/aptsources/distro.py b/aptsources/distro.py index 5a6301bd..ff1bed89 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -446,6 +446,8 @@ def _lsb_release(): 'Release': 'unstable'} try: out = Popen(['lsb_release', '--all'], stdout=PIPE).communicate()[0] + # Convert to unicode string, needed for Python 3.1 + out = out.decode("utf-8") result.update(l.split(":\t") for l in out.split("\n") if ':\t' in l) except OSError, exc: if exc.errno != errno.ENOENT: |
