SeleniumHQ/selenium — pull request #127 by adiroiban (2013-10-15 12:06:22+00:00)
Title: [#6407] Remove Firefox tmp folder on quit.

Problem description
===================

When Firefox is closed in an ugly way, the WebDriver.quit() command raise an socket.error and then the temp profile is not removed.

This is ticket 6407 from google code http://code.google.com/p/selenium/issues/detail?id=6407

Changes description
===================

Add socket.error in the list of expected errors from WebDriver.quit()

Also remove unused imports from this file and make it pep8 friendly.

How to try and test the changes
===============================

Run a firefox test and force kill the Firefox browser process while tests are running.

The temp folder should be removed.

I have signed the license aggrement.

Thanks!