summaryrefslogtreecommitdiff
path: root/aptsources/distro.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-10-21 09:13:58 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-10-21 09:13:58 +0200
commit8ca5779cfe930f8a423969f7266949ab2826cede (patch)
tree44918730b1f9f5a567ac89f15ab661ae7be1e1a9 /aptsources/distro.py
parent50756e0efb5081d3379fa874ca41ab57bdf2798d (diff)
parent52097d7edaa97379a4a604be4feb24e5e9c3bd73 (diff)
downloadpython-apt-8ca5779cfe930f8a423969f7266949ab2826cede.tar.gz
merged from the debian-sid branch
Diffstat (limited to 'aptsources/distro.py')
-rw-r--r--aptsources/distro.py5
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