~james-page/charms/trusty/ceilometer/tox

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/network/ip.py

  • Committer: Liam Young
  • Date: 2015-09-03 09:44:12 UTC
  • Revision ID: liam.young@canonical.com-20150903094412-we17mh4hgp7yrkj6
[gnuoy,trivial] Charmhelper sync (+1'd by mojo)

Show diffs side-by-side

added added

removed removed

Lines of Context:
435
435
 
436
436
        rev = dns.reversename.from_address(address)
437
437
        result = ns_query(rev)
 
438
 
438
439
        if not result:
439
 
            return None
 
440
            try:
 
441
                result = socket.gethostbyaddr(address)[0]
 
442
            except:
 
443
                return None
440
444
    else:
441
445
        result = address
442
446