mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
python3: 2to3 changes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -15,7 +15,6 @@ import signal
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from string import maketrans
|
||||
from functools import partial
|
||||
from ipaddr import IPNetwork, IPAddress
|
||||
|
||||
@@ -132,12 +131,13 @@ class utils():
|
||||
else:
|
||||
logger.debug('warning: path %s not found: %s won\'t be usable' % (path + cmd, cmd))
|
||||
|
||||
mac_translate_tab = maketrans(":.-,", " ")
|
||||
mac_translate_tab = str.maketrans(":.-,", " ")
|
||||
|
||||
@classmethod
|
||||
def mac_str_to_int(cls, hw_address):
|
||||
mac = 0
|
||||
if hw_address:
|
||||
pass
|
||||
for i in hw_address.translate(cls.mac_translate_tab).split():
|
||||
mac = mac << 8
|
||||
mac += int(i, 16)
|
||||
|
Reference in New Issue
Block a user