Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
try:
n = self.db.lookup(address)
except ValueError:
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,
args = {
"address" : address,
# Nothing found?
if not n:
# Nothing found?
if not n:
- print(_("Nothing found for %(address)s") % args)
+ print(_("Nothing found for %(address)s") % args, file=sys.stderr)
try:
asn = int(asn)
except ValueError:
try:
asn = int(asn)
except ValueError:
- sys.stderr.write("Invalid ASN: %s" %asn)
+ print(_("Invalid ASN: %s") % asn, file=sys.stderr)
# Nothing found
if not a:
# Nothing found
if not a:
- print(_("Could not find AS%s") % asn)
+ print(_("Could not find AS%s") % asn, file=sys.stderr)