diff options
| author | Robert Li <baoli@cisco.com> | 2016-01-14 07:54:29 -0500 |
|---|---|---|
| committer | Dmitry Tantsur <divius.inside@gmail.com> | 2016-08-17 16:35:07 +0200 |
| commit | 9e4b769055d0d4ca136afa0b1865930cc2cec6d7 (patch) | |
| tree | a4c6d609b0d01af07a4d7fde83caf03f174e9c09 /ironic_python_agent/netutils.py | |
| parent | d34bc0559ce1b51f059b0fdf78fd4498ddd4cae4 (diff) | |
| download | ironic-python-agent-9e4b769055d0d4ca136afa0b1865930cc2cec6d7.tar.gz | |
Build socket list right before select call
This will make sure the socket list and the interface list are
always in sync, and the select call is on the right list of
sockets.
Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Closes-Bug: #1533892
Change-Id: Id6710f4648203b7d476a2a16ea647224baca1bb9
Diffstat (limited to 'ironic_python_agent/netutils.py')
| -rw-r--r-- | ironic_python_agent/netutils.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ironic_python_agent/netutils.py b/ironic_python_agent/netutils.py index ccf73c14..801833a3 100644 --- a/ironic_python_agent/netutils.py +++ b/ironic_python_agent/netutils.py @@ -162,13 +162,12 @@ def _get_lldp_info(interfaces): if not interfaces: return {} - socks = [interface[1] for interface in interfaces] - while interfaces: LOG.info('Waiting on LLDP info for interfaces: %(interfaces)s, ' 'timeout: %(timeout)s', {'interfaces': interfaces, 'timeout': CONF.lldp_timeout}) + socks = [interface[1] for interface in interfaces] # rlist is a list of sockets ready for reading rlist, _, _ = select.select(socks, [], [], CONF.lldp_timeout) if not rlist: |
