Commit 87540ad7 by Stéphane Graber

python-lxc: Always convert state passed to wait() to uppercase

At Serge's suggestion, always convert the state passed to the wait() function in the python API to its uppercase equivalent. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 16216c83
......@@ -362,6 +362,15 @@ class Container(_lxc.Container):
self.clear_config_item(key)
return False
def wait(self, state, timeout = -1):
"""
Wait for the container to reach a given state or timeout.
"""
if isinstance(state, str):
state = state.upper()
_lxc.Container.wait(self, state, timeout)
def list_containers(as_object=False):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment