File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2323except (ImportError , AttributeError ): # AttributeError happens when a prior pymsalruntime uninstallation somehow leaved an empty folder behind
2424 # PyMsalRuntime currently supports these Windows versions, listed in this MSFT internal link
2525 # https://github.com/AzureAD/microsoft-authentication-library-for-cpp/pull/2406/files
26- raise ImportError ('You need to install dependency by: pip install "msal[broker]>=1.20,<2"' )
26+ min_ver = {
27+ "win32" : "1.20" ,
28+ "darwin" : "1.31" ,
29+ }.get (sys .platform )
30+ if min_ver :
31+ raise ImportError (
32+ f'You must install dependency by: pip install "msal[broker]>={ min_ver } ,<2"' )
33+ else : # Unsupported platform
34+ raise ImportError ("Dependency pymsalruntime unavailable on current platform" )
2735# It could throw RuntimeError when running on ancient versions of Windows
2836
2937
You can’t perform that action at this time.
0 commit comments