Commit 9f2f5d13 authored by Michael Tremer's avatar Michael Tremer

location-query: Use print to print errors, too

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 273948cf
......@@ -98,7 +98,7 @@ class CLI(object):
try:
n = self.db.lookup(address)
except ValueError:
sys.stderr.write(_("Invalid IP address: %s") % address)
print(_("Invalid IP address: %s") % address, file=sys.stderr)
args = {
"address" : address,
......@@ -107,7 +107,7 @@ class CLI(object):
# Nothing found?
if not n:
print(_("Nothing found for %(address)s") % args)
print(_("Nothing found for %(address)s") % args, file=sys.stderr)
ret = 1
continue
......@@ -138,7 +138,7 @@ class CLI(object):
try:
asn = int(asn)
except ValueError:
sys.stderr.write("Invalid ASN: %s" %asn)
print(_("Invalid ASN: %s") % asn, file=sys.stderr)
ret = 1
continue
......@@ -147,7 +147,7 @@ class CLI(object):
# Nothing found
if not a:
print(_("Could not find AS%s") % asn)
print(_("Could not find AS%s") % asn, file=sys.stderr)
ret = 1
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment