diff options
| author | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2015-07-15 16:08:10 +0100 |
|---|---|---|
| committer | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2015-07-15 17:12:08 +0100 |
| commit | 06eed473fb06cc5a8b9c66157d199f6636c52cbf (patch) | |
| tree | 4b9b9dd91d91937013fe6d58e30afc617e1f29fd /ironic_python_agent/netutils.py | |
| parent | fdf7b8d882255fc47d253eb7ddbaa0d16dad3c1e (diff) | |
| download | ironic-python-agent-06eed473fb06cc5a8b9c66157d199f6636c52cbf.tar.gz | |
Add Python3 support
This patch add Python 3 support for IPA. We still need to enable it on
gate to avoid code breaking the support from sneaking in.
Partial-Bug: #1474896
Depends-On: I5a774eaa8d978f4d50faca4dc1b03a87fb194ce2
Change-Id: If47c0797b63d2914b3c47aba62ec5201301b6c33
Diffstat (limited to 'ironic_python_agent/netutils.py')
| -rw-r--r-- | ironic_python_agent/netutils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ironic_python_agent/netutils.py b/ironic_python_agent/netutils.py index 8b005eba..5a89cd8b 100644 --- a/ironic_python_agent/netutils.py +++ b/ironic_python_agent/netutils.py @@ -30,7 +30,6 @@ from ironic_python_agent.cmd import agent # noqa LOG = logging.getLogger(__name__) CONF = cfg.CONF - LLDP_ETHERTYPE = 0x88cc IFF_PROMISC = 0x100 SIOCGIFFLAGS = 0x8913 @@ -66,7 +65,7 @@ class RawPromiscuousSockets(object): LOG.info('Interface %s entering promiscuous mode to capture ', interface_name) try: - ifr.ifr_ifrn = interface_name + ifr.ifr_ifrn = interface_name.encode() # Get current flags fcntl.ioctl(sock.fileno(), SIOCGIFFLAGS, ifr) # G for Get # bitwise or the flags with promiscuous mode, set the new flags @@ -91,7 +90,7 @@ class RawPromiscuousSockets(object): def __exit__(self, exception_type, exception_val, trace): if exception_type: - LOG.exception('Error while using raw socket: %(type)s: %(val)', + LOG.exception('Error while using raw socket: %(type)s: %(val)s', {'type': exception_type, 'val': exception_val}) for _name, sock, ifr in self.interfaces: |
