From b9844054663142c3e8dad1a6e1b3612c7db2054b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 16 Mar 2014 21:43:36 +0100 Subject: utils/get_*_mirrors*.py: Use sys.stderr.write instead of print pyflakes does not handle from __future__ import print_function, so work around it. --- utils/get_debian_mirrors.py | 4 ++-- utils/get_ubuntu_mirrors_from_lp.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'utils') 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") -- cgit v1.2.3