Bug 1195732 - Intermittent Talos AttributeError: 'ProcessHandler' object has no attribute 'returncode'. r=:jmaher
authorJulien Pagès <j.parkouss@gmail.com>
Tue, 18 Aug 2015 18:34:28 +0200
changeset 997 306fac2f61aa
parent 996 c0039de7a1c6
child 998 e970f49a2dd2
push id686
push userj.parkouss@gmail.com
push dateTue, 18 Aug 2015 16:51:42 +0000
bugs1195732
Bug 1195732 - Intermittent Talos AttributeError: 'ProcessHandler' object has no attribute 'returncode'. r=:jmaher
talos/talos_process.py
--- a/talos/talos_process.py
+++ b/talos/talos_process.py
@@ -60,17 +60,17 @@ def run_browser(command, timeout=None, o
         # wait until we saw __endTimestamp in the proc output,
         # or the browser just terminated - or we have a timeout
         if not event.wait(timeout):
             raise TalosError("timeout")
         if reader.got_end_timestamp:
             for i in range(1, wait_for_quit_timeout):
                 if proc.wait(1) is not None:
                     break
-            if proc.returncode is not None:
+            if proc.poll() is None:
                 logging.info(
                     "Browser shutdown timed out after {0} seconds, terminating"
                     " process.".format(wait_for_quit_timeout)
                 )
     finally:
         # this also handle KeyboardInterrupt
         if proc.poll() is None:
             proc.kill()