summaryrefslogtreecommitdiff
path: root/aptsources/sourceslist.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-10-18 11:51:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-10-18 11:51:44 +0200
commit3bf6b76611bf0b148d495e2e4aae08546e54fa94 (patch)
tree52a21ae6f4742644a5709b3a160c862d818e821f /aptsources/sourceslist.py
parentd9deeabe21f828ae4301c4aab5073f775f954e25 (diff)
downloadpython-apt-3bf6b76611bf0b148d495e2e4aae08546e54fa94.tar.gz
fix compat issues with python3
Diffstat (limited to 'aptsources/sourceslist.py')
-rw-r--r--aptsources/sourceslist.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py
index 76bea43a..0c4335ec 100644
--- a/aptsources/sourceslist.py
+++ b/aptsources/sourceslist.py
@@ -25,6 +25,7 @@
import gettext
import glob
+import logging
import os.path
import re
import shutil
@@ -346,7 +347,7 @@ class SourcesList(object):
source = SourceEntry(line, file)
self.list.append(source)
except:
- print "could not open file '%s'" % file
+ logging.error("could not open file '%s'" % file)
else:
f.close()
@@ -437,14 +438,14 @@ if __name__ == "__main__":
sources = SourcesList()
for entry in sources:
- print entry.str()
+ logging.info("entry %s" % entry.str())
#print entry.uri
mirror = is_mirror("http://archive.ubuntu.com/ubuntu/",
"http://de.archive.ubuntu.com/ubuntu/")
- print "is_mirror(): %s" % mirror
+ logging.info("is_mirror(): %s" % mirror)
- print is_mirror("http://archive.ubuntu.com/ubuntu",
- "http://de.archive.ubuntu.com/ubuntu/")
- print is_mirror("http://archive.ubuntu.com/ubuntu/",
- "http://de.archive.ubuntu.com/ubuntu")
+ logging.info(is_mirror("http://archive.ubuntu.com/ubuntu",
+ "http://de.archive.ubuntu.com/ubuntu/"))
+ logging.info(is_mirror("http://archive.ubuntu.com/ubuntu/",
+ "http://de.archive.ubuntu.com/ubuntu"))