~1chb1n/charms/trusty/cinder/15.10-stable-flip-tests-helper-syncs

« back to all changes in this revision

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

  • Committer: James Page
  • Date: 2015-10-22 13:19:13 UTC
  • Revision ID: james.page@ubuntu.com-20151022131913-02u2l9s2fa0xtbio
Tags: 15.10
15.10 Charm release

Show diffs side-by-side

added added

removed removed

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