if self.address is None:
return None
- def format_byte( byte ):
- return "{0:02x}".format( byte )
-
return_value = '<undef>'
if self.type == 'guid':
return_value = '0x'
for byte in self.address:
return_value += "{0:02x}".format( byte )
elif self.type == 'mac':
- return_value = ':'.join( map( format_byte, self.address ) )
+ return_value = ':'.join( map( lambda b: "{0:02x}".format( b ), self.address ) )
return return_value
if self.verbose >= 2:
self.logger.debug( "Nibblelist to display: {0!r}.".format( pp.pformat( nibble_list ) ) )
- def format_nibble( nibble ):
- return "{0:x}".format( nibble )
-
- return ':'.join( map( format_nibble, nibble_list ) )
+ return ':'.join( map( lambda n: "{0:x}".format( n ), nibble_list ) )
#------------------------------------------------------