Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion msal/oauth2cli/authcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
It optionally opens a browser window to guide a human user to manually login.
After obtaining an auth code, the web server will automatically shut down.
"""
import webbrowser
import logging
import socket
from string import Template
Expand Down Expand Up @@ -35,6 +34,7 @@ def obtain_auth_code(listen_port, auth_uri=None): # Historically only used in t


def _browse(auth_uri):
import webbrowser # Lazy import. Some distro may not have this.
controller = webbrowser.get() # Get a default controller
# Some Linux Distro does not setup default browser properly,
# so we try to explicitly use some popular browser, if we found any.
Expand Down