Skip to content

Commit

Permalink
Allow stop to be safely called multiple times.
Browse files Browse the repository at this point in the history
If stop is called on an already-stopped service (e.g. by __del__) it must not signal the PID of the now-dead phantomjs process.

Signed-off-by: AutomatedTester <dburns@mozilla.com>
  • Loading branch information
Tony Hignett authored and AutomatedTester committed Jul 29, 2015
1 parent bc8c2c8 commit 879a5ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions py/selenium/webdriver/phantomjs/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def stop(self):
self.process.stdin.close()
self.process.kill()
self.process.wait()
self.process = None
except OSError:
# kill may not be available under windows environment
pass

0 comments on commit 879a5ed

Please sign in to comment.