summaryrefslogtreecommitdiff
path: root/aptsources/distro.py
diff options
context:
space:
mode:
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