summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-03-16 21:43:36 +0100
committerJulian Andres Klode <jak@debian.org>2014-03-16 21:43:36 +0100
commitb9844054663142c3e8dad1a6e1b3612c7db2054b (patch)
treed63b5316639dbf0f9b2e4c79167a2c5183a2ceca /utils
parentb3696b91a76226ced91e8e9de5f7d55642f1ee7a (diff)
downloadpython-apt-b9844054663142c3e8dad1a6e1b3612c7db2054b.tar.gz
utils/get_*_mirrors*.py: Use sys.stderr.write instead of print
pyflakes does not handle from __future__ import print_function, so work around it.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/get_debian_mirrors.py4
-rwxr-xr-xutils/get_ubuntu_mirrors_from_lp.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/get_debian_mirrors.py b/utils/get_debian_mirrors.py
index 4d34f5b6..5f4d7ff0 100755
--- a/utils/get_debian_mirrors.py
+++ b/utils/get_debian_mirrors.py
@@ -39,8 +39,8 @@ for mirror in deb822.Deb822.iter_paragraphs(masterlist):
mirror["Archive-%s" % proto]))
if len(mirrors) == 0:
- print("E: Could not read the mirror list due to some unknown issue",
- file=sys.stderr)
+ sys.stderr.write("E: Could not read the mirror list due to "
+ "some unknown issue\n")
sys.exit(1)
for country in sorted(mirrors):
print("#LOC:%s" % country)
diff --git a/utils/get_ubuntu_mirrors_from_lp.py b/utils/get_ubuntu_mirrors_from_lp.py
index 8fc34c8d..dd02b63d 100755
--- a/utils/get_ubuntu_mirrors_from_lp.py
+++ b/utils/get_ubuntu_mirrors_from_lp.py
@@ -43,8 +43,8 @@ for entry in d.entries:
keys = sorted(countries)
if len(keys) == 0:
- print("E: Could not read the mirror list due to some issue"
- " -- status code: %s" % d.status, file=sys.stderr)
+ sys.stderr.write("E: Could not read the mirror list due to some issue"
+ " -- status code: %s\n" % d.status)
sys.exit(1)
print("mirror://mirrors.ubuntu.com/mirrors.txt")