equal
deleted
inserted
replaced
621 # pack into nibbles |
621 # pack into nibbles |
622 nibbles = [((ord(x) >> 4) & 0xf, ord(x) & 0xf) for x in address.packed] |
622 nibbles = [((ord(x) >> 4) & 0xf, ord(x) & 0xf) for x in address.packed] |
623 nibbles = [nibble for nibblepair in nibbles for nibble in nibblepair] |
623 nibbles = [nibble for nibblepair in nibbles for nibble in nibblepair] |
624 |
624 |
625 # take the suffix |
625 # take the suffix |
626 nibbles = nibbles[:-(hostbits / 4)] |
626 nibbles = nibbles[-(hostbits / 4):] |
627 |
627 |
628 # reverse in hex |
628 # reverse in hex |
629 return '.'.join(reversed(["{0:x}".format(x) for x in nibbles])) |
629 return '.'.join(reversed(["{0:x}".format(x) for x in nibbles])) |
630 |
630 |
631 else : |
631 else : |