Skip to content

Commit

Permalink
WindowsError is not cross platform, use OSError instead.
Browse files Browse the repository at this point in the history
Thanks to user me.ssword for pointing this out.

Fixes Issue 5034
  • Loading branch information
lukeis committed Jan 29, 2013
1 parent 12cdd1e commit 55a09d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/chrome/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ def stop(self):
if self.process:
self.process.kill()
self.process.wait()
except WindowsError:
except OSError:
# kill may not be available under windows environment
pass
2 changes: 1 addition & 1 deletion py/selenium/webdriver/firefox/firefox_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _find_exe_in_registry(self):
key = OpenKey(HKEY_LOCAL_MACHINE, path)
command = QueryValue(key, "")
break
except WindowsError:
except OSError:
pass
else:
return ""
Expand Down
2 changes: 1 addition & 1 deletion py/selenium/webdriver/phantomjs/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ def stop(self):
if self.process:
self.process.kill()
self.process.wait()
except WindowsError:
except OSError:
# kill may not be available under windows environment
pass

0 comments on commit 55a09d9

Please sign in to comment.