diff --git a/ovhtool.py b/ovhtool.py index 0eb112d..f70700b 100644 --- a/ovhtool.py +++ b/ovhtool.py @@ -73,7 +73,8 @@ if __name__ == "__main__": if args[''] == 'list': ips = list_ips() 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[''] == 'sync': client = ovh.Client() server = client.get('/dedicated/server')[0]