Browse Source

py-i2phosts-injector: replace print() with sys.stdout.write()

pull/1/head
Hidden Z 14 years ago
parent
commit
297c9e9b55
  1. 6
      py-i2phosts-injector

6
py-i2phosts-injector

@ -76,14 +76,14 @@ for line in f: @@ -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…
Cancel
Save