|
|
@ -76,14 +76,14 @@ for line in f: |
|
|
|
h = i2phost.objects.get(name=hostname) |
|
|
|
h = i2phost.objects.get(name=hostname) |
|
|
|
except i2phost.DoesNotExist: |
|
|
|
except i2phost.DoesNotExist: |
|
|
|
if not args.quiet: |
|
|
|
if not args.quiet: |
|
|
|
print 'Adding %s' % hostname |
|
|
|
sys.stdout.write('Adding %s' % hostname) |
|
|
|
host = i2phost(name=hostname, b64hash=base64, |
|
|
|
host = i2phost(name=hostname, b64hash=base64, |
|
|
|
description=args.description, |
|
|
|
description=args.description, |
|
|
|
activated=False, external=True, approved=approved) |
|
|
|
activated=False, external=True, approved=approved) |
|
|
|
host.save() |
|
|
|
host.save() |
|
|
|
else: |
|
|
|
else: |
|
|
|
if not args.supress: |
|
|
|
if not args.supress: |
|
|
|
print 'Host %s already exists' % hostname |
|
|
|
sys.stdout.write('Host %s already exists' % hostname) |
|
|
|
if h.b64hash != base64: |
|
|
|
if h.b64hash != base64: |
|
|
|
print 'Key conflict for host: %s' % hostname |
|
|
|
sys.stdout.write('Key conflict for host: %s' % hostname) |
|
|
|
f.close() |
|
|
|
f.close() |
|
|
|