Fix list subcommand failing on empty domain
This commit is contained in:
parent
f6cdae0158
commit
43a8f83f56
@ -73,7 +73,8 @@ if __name__ == "__main__":
|
|||||||
if args['<command>'] == 'list':
|
if args['<command>'] == 'list':
|
||||||
ips = list_ips()
|
ips = list_ips()
|
||||||
for _, ip in ips.items():
|
for _, ip in ips.items():
|
||||||
print '%15s | %17s | %s' % (ip.ip, ip.mac, ip.domain)
|
hostname = ip.domain.name() if ip.domain else ''
|
||||||
|
print '%15s | %17s | %s' % (ip.ip, ip.mac, hostname)
|
||||||
elif args['<command>'] == 'sync':
|
elif args['<command>'] == 'sync':
|
||||||
client = ovh.Client()
|
client = ovh.Client()
|
||||||
server = client.get('/dedicated/server')[0]
|
server = client.get('/dedicated/server')[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user