mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 12:34:17 +00:00
py-i2phosts-injector: replace print() with sys.stdout.write()
This commit is contained in:
parent
4755c0d35b
commit
297c9e9b55
@ -76,14 +76,14 @@ for line in f:
|
||||
h = i2phost.objects.get(name=hostname)
|
||||
except i2phost.DoesNotExist:
|
||||
if not args.quiet:
|
||||
print 'Adding %s' % hostname
|
||||
sys.stdout.write('Adding %s' % hostname)
|
||||
host = i2phost(name=hostname, b64hash=base64,
|
||||
description=args.description,
|
||||
activated=False, external=True, approved=approved)
|
||||
host.save()
|
||||
else:
|
||||
if not args.supress:
|
||||
print 'Host %s already exists' % hostname
|
||||
sys.stdout.write('Host %s already exists' % hostname)
|
||||
if h.b64hash != base64:
|
||||
print 'Key conflict for host: %s' % hostname
|
||||
sys.stdout.write('Key conflict for host: %s' % hostname)
|
||||
f.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user