Changeset 63 for trunk/pxeconfig/hexls


Ignore:
Timestamp:
11/28/05 20:27:30 (17 years ago)
Author:
bas
Message:

hexls:

  • Fixed a bug in hostname resolving

And an new version ;-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pxeconfig/hexls

    r62 r63  
    4949
    5050                        ipaddr = '%d.%d.%d.%d' % (digit1, digit2, digit3, digit4)
    51                         hostname = socket.gethostbyaddr(ipaddr)
     51                        try:
     52                                hostname = socket.gethostbyaddr(ipaddr)
     53                        except socket.herror, detail:
     54                                hostname = ( detail[1], 'dummy' )
     55
    5256                        if hostname:
    5357                                print '%s => %s => %s' % (f, ipaddr, hostname[0])
Note: See TracChangeset for help on using the changeset viewer.