2015-07-28 20:50:31 |
Assaf Muller |
description |
I got a UnboundLocalError: local variable 'port_info' referenced before assignment exception while running local, yet unmerged fullstack tests. Looking at the code you can get that exception in one of two scenarios:
1) _agent_has_updates is False during the first iteration, I'm not sure if this is possible.
2) Or, in my case while executing the first '*port_info* = self.scan_ports(reg_ports, updated_ports_copy)', self.scan_ports raised an exception which is caught in the main RPC loop and then the very end of the RPC loop is reached, at which point 'port_stats = self.get_port_stats(*port_info*, ancillary_port_info)' raises an UnboundLocalError exception because port_info was never defined. |
I got a UnboundLocalError: local variable 'port_info' referenced before assignment exception while running local, yet unmerged fullstack tests. Looking at the code you can get that exception in one of two scenarios:
1) _agent_has_updates is False during the first iteration, I'm not sure if this is possible.
2) Or, in my case while executing the first '*port_info* = self.scan_ports(reg_ports, updated_ports_copy)', self.scan_ports raised an exception which is caught in the main RPC loop and then the very end of the RPC loop is reached, at which point 'port_stats = self.get_port_stats(*port_info*, ancillary_port_info)' raises an UnboundLocalError exception because port_info was never defined.
This is a regression that results from https://review.openstack.org/#/c/199164/. |
|