This patch fixes the native implementation Timeout context exception. The Timeout class type calls ``_wait()`` in ``start()``, which blocks immediately. This prevents it from working as a context manager. How it is fixed: * Added timeout checking in ``__exit__``. When exiting the context manager, it checks if a timeout occurred and raises the exception. * Added a ``_timed_out`` flag to track if the timeout occurred. * Fixed ``cancel()`` to handle the case where timer might be None. Related-Bug: #2130631 Change-Id: I7aa94c67ccdd222ef9e69b7be453a0dbbc2fcad2 Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
os-ken
A component-based software defined networking framework in OpenStack.
This is a fork of the Ryu library tailored for OpenStack Neutron.
- License: Apache License, Version 2.0
- Documentation: https://docs.openstack.org/os-ken/latest/
- Source: https://opendev.org/openstack/os-ken/
- Bugs: https://storyboard.openstack.org/#!/project/openstack/os-ken
- Release Notes: https://docs.openstack.org/releasenotes/os-ken
Description
Languages
Python
86.1%
Erlang
13.3%
C
0.4%
Shell
0.2%