Trying to fix the tests

This commit is contained in:
Michael Lazar
2017-09-06 01:16:42 -04:00
parent 1135869d6c
commit 77a3557edd
2 changed files with 12 additions and 3 deletions

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