cellular: Dispatch all pending events in ShillProxy.wait_for_property_in()
BUG=chromium:417397
TEST=network_3GSmokeTest
Change-Id: Ibd91bc2e64b1c80fb2732fb7a468e1109c1d1830
Reviewed-on: https://chromium-review.googlesource.com/219769
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
diff --git a/client/cros/networking/shill_proxy.py b/client/cros/networking/shill_proxy.py
index d0b49b4..31d5d47 100644
--- a/client/cros/networking/shill_proxy.py
+++ b/client/cros/networking/shill_proxy.py
@@ -360,9 +360,9 @@
context = gobject.MainLoop().get_context()
while duration() < timeout_seconds:
- # This has caused 1 or fewer events to be dispatched.
+ # Dispatch all pending events.
while context.iteration(False):
- time.sleep(0.2)
+ pass
while update_queue:
updated_property, value = map(self.dbus2primitive,