diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-21 09:13:58 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-21 09:13:58 +0200 |
| commit | 8ca5779cfe930f8a423969f7266949ab2826cede (patch) | |
| tree | 44918730b1f9f5a567ac89f15ab661ae7be1e1a9 /aptsources/distro.py | |
| parent | 50756e0efb5081d3379fa874ca41ab57bdf2798d (diff) | |
| parent | 52097d7edaa97379a4a604be4feb24e5e9c3bd73 (diff) | |
| download | python-apt-8ca5779cfe930f8a423969f7266949ab2826cede.tar.gz | |
merged from the debian-sid branch
Diffstat (limited to 'aptsources/distro.py')
| -rw-r--r-- | aptsources/distro.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/aptsources/distro.py b/aptsources/distro.py index 28d5b96f..f777a4ea 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -22,6 +22,7 @@ # USA import gettext +import logging import re import os import sys @@ -464,9 +465,9 @@ def _lsb_release(): # 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: + except OSError as exc: if exc.errno != errno.ENOENT: - print 'WARNING: lsb_release failed, using defaults:', exc + logging.warn('lsb_release failed, using defaults:' % exc) return result |
