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 | |
| parent | 875d039bdfa15a02968ab8188584fae790a92d5f (diff) | |
| download | python-apt-773c5de21c809c7fe07eefafa252efa0b6758744.tar.gz | |
aptsources/distro.py: Support Python 3, decode lsb_release results using utf-8.
| -rw-r--r-- | aptsources/distro.py | 2 | ||||
| -rw-r--r-- | debian/changelog | 1 |
2 files changed, 3 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: diff --git a/debian/changelog b/debian/changelog index b955b155..646b9efe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ python-apt (0.7.93) UNRELEASED; urgency=low build-time dependency. * aptsources: - Make all classes subclasses of object. + - distro.py: Support Python 3, decode lsb_release results using utf-8. [ Colin Watson ] * apt/progress/__init__.py: |
