commit | 3af3c3373552d66f3b1f87da8c0709f995418dc9 | [log] [tgz] |
---|---|---|
author | koder aka kdanilov <kdanilov@mirantis.com> | Mon Dec 19 17:12:34 2016 +0200 |
committer | koder aka kdanilov <kdanilov@mirantis.com> | Mon Dec 19 17:12:34 2016 +0200 |
tree | 374c4afb081b02087afad02e4fe410903eefc302 | |
parent | 962ee5f441e556440aaa3dd04934e269930b4b2a [diff] [blame] |
sensors refactored
diff --git a/wally/node.py b/wally/node.py index 4d2dda8..9f4250b 100644 --- a/wally/node.py +++ b/wally/node.py
@@ -175,11 +175,13 @@ cmd_b = cmd.encode("utf8") proc_id = self.conn.cli.spawn(cmd_b, timeout=timeout, merge_out=True) - code = None out = "" - while code is None: + + while True: code, outb, _ = self.conn.cli.get_updates(proc_id) out += outb.decode("utf8") + if code is not None: + break time.sleep(0.01) if code != 0: