Permalink
Browse files

Fix deadlock issue while tearing down browser and none is opened.

  • Loading branch information...
1 parent f4ab8eb commit 2a868d677b257d9f5c5201a2f99bc94a72c4e924 @jone jone committed Mar 24, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 ftw/testing/browser.py
View
@@ -53,6 +53,10 @@ def get_driver():
def shutdown_browser():
+ if CURRENT_BROWSER_INSTANCE is None:
+ # no browser is opened - no need for shutting down.
+ return
+
assert CURRENT_BROWSER_DRIVER is not None
if CURRENT_BROWSER_DRIVER != 'zope.testbrowser':
obj = browser()

0 comments on commit 2a868d6

Please sign in to comment.