Trying to fix the tests

This commit is contained in:
Michael Lazar committed 2017-09-06 01:16:42 -04:00
1 parent 1135869d6c
commit 77a3557edd
2 files changed
+12 -3

No files matched your search

+5 -1
View File
@@ -42,7 +42,11 @@ def patch_webbrowser():
for cmdline in reversed(_userchoices):
if cmdline in ('safari', 'firefox', 'chrome', 'default'):
browser = webbrowser.MacOSXOSAScript(cmdline)
webbrowser.register(cmdline, None, browser, -1)
try:
webbrowser.register(cmdline, None, browser, update_tryorder=-1)
except AttributeError:
# 3.7 nightly build changed the method signature
webbrowser.register(cmdline, None, browser, preferred=True)
@contextmanager