diff --git a/src/azure-cli-core/azure/cli/core/util.py b/src/azure-cli-core/azure/cli/core/util.py index b3317d6528e..020bc0e6972 100644 --- a/src/azure-cli-core/azure/cli/core/util.py +++ b/src/azure-cli-core/azure/cli/core/util.py @@ -288,7 +288,10 @@ def open_page_in_browser(url): # understand the "open location" message" # b. Python 2.x can't sniff out the default browser return subprocess.Popen(['open', url]) - return webbrowser.open(url, new=2) # 2 means: open in a new tab, if possible + try: + return webbrowser.open(url, new=2) # 2 means: open in a new tab, if possible + except TypeError: # See https://bugs.python.org/msg322439 + return webbrowser.open(url, new=2) def _get_platform_info():