From: Frank Brehm Date: Tue, 4 Jan 2011 15:59:45 +0000 (+0000) Subject: External rausgenommen X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=5ccb5c03780f11e07b6725ff4b70273eaff3a7ab;p=my-stuff%2Fipv6-hostpart.git External rausgenommen git-svn-id: http://svn.brehm-online.com/svn/my-stuff/ipv6-hostpart/trunk@184 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- diff --git a/bin/net/ll_hw_address.py b/bin/net/ll_hw_address.py index 97e631d..587941d 100755 --- a/bin/net/ll_hw_address.py +++ b/bin/net/ll_hw_address.py @@ -133,16 +133,13 @@ class LlHardwareAddress(LoggingObject): if self.address is None: return None - def format_byte( byte ): - return "{0:02x}".format( byte ) - return_value = '' 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 @@ -192,10 +189,7 @@ class LlHardwareAddress(LoggingObject): 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 ) ) #------------------------------------------------------