From 4755c0d35bf2ea98d5c287ca3e5a2260954a7752 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sat, 30 Oct 2010 18:10:42 +0000 Subject: [PATCH] py-i2phosts-injector: replace sys.stderr with sys.stdout where needed Writing such kind of messages to stderr was a mistake. --- py-i2phosts-injector | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py-i2phosts-injector b/py-i2phosts-injector index 934916f..0c2d760 100755 --- a/py-i2phosts-injector +++ b/py-i2phosts-injector @@ -59,7 +59,7 @@ for line in f: if line.startswith('#') or line.isspace(): continue if line.find('=') == -1: - sys.stderr.write('Invalid line: %s\n' % line) + sys.stdout.write('Invalid line: %s\n' % line) continue # strip trailing '\n' line = line.rstrip('\n') @@ -68,7 +68,7 @@ for line in f: hostname = validate_hostname(entry[0]) base64 = validate_b64hash(entry[1], check_uniq=False) # don't require uniqueness except ValidationError, e: - sys.stderr.write('validation error: %s: %s\n\n' % (e, line)) + sys.stdout.write('validation error: %s: %s\n\n' % (e, line)) else: # Check for already existed hosts in database to avoid unneeded INSERTs # beacuse they will fail anyway.