Ticket #57034: uuid-64bit.patch

File uuid-64bit.patch, 1.1 KB (added by rmottola (Riccardo), 6 years ago)

patch for file (path is relative though)

  • uuid.py

    old new  
    522522
    523523_node = None
    524524
    525 _NODE_GETTERS_WIN32 = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]
    526 
    527 _NODE_GETTERS_UNIX = [_unixdll_getnode, _ifconfig_getnode, _arp_getnode,
    528                       _lanscan_getnode, _netstat_getnode]
    529 
    530 
    531525def getnode():
    532526    """Get the hardware address as a 48-bit positive integer.
    533527
     
    543537
    544538    import sys
    545539    if sys.platform == 'win32':
    546         getters = _NODE_GETTERS_WIN32
     540        getters = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]
    547541    else:
    548         getters = _NODE_GETTERS_UNIX
     542        getters = [_unixdll_getnode, _ifconfig_getnode, _arp_getnode,
     543                   _lanscan_getnode, _netstat_getnode]
    549544
    550545    for getter in getters + [_random_getnode]:
    551546        try:
    552547            _node = getter()
    553548        except:
    554549            continue
    555         if (_node is not None) and (0 <= _node < (1 << 48)):
     550        if _node is not None:
    556551            return _node
    557     assert False, '_random_getnode() returned invalid value: {}'.format(_node)
    558552
    559553_last_timestamp = None
    560554