since it's only used here, move the statement above "browser_driver = getattr(settings, 'LETTUCE_BROWSER', 'chrome')" into this else block.