File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,18 @@ def _select_options(
3434 return raw_data
3535
3636def _input_scopes ():
37- return _select_options ([
37+ scopes = _select_options ([
3838 "https://graph.microsoft.com/.default" ,
3939 "https://management.azure.com/.default" ,
4040 "User.Read" ,
4141 "User.ReadBasic.All" ,
4242 ],
4343 header = "Select a scope (multiple scopes can only be input by manually typing them, delimited by space):" ,
4444 accept_nonempty_string = True ,
45- ).split ()
45+ ).split () # It also converts the input string(s) into a list
46+ if "https://pas.windows.net/CheckMyAccess/Linux/.default" in scopes :
47+ raise ValueError ("SSH Cert scope shall be tested by its dedicated functions" )
48+ return scopes
4649
4750def _select_account (app ):
4851 accounts = app .get_accounts ()
@@ -183,6 +186,8 @@ def main():
183186 ], option_renderer = lambda f : f .__doc__ , header = "MSAL Python APIs:" )
184187 try :
185188 func (app )
189+ except ValueError as e :
190+ logging .error ("Invalid input: %s" , e )
186191 except KeyboardInterrupt : # Useful for bailing out a stuck interactive flow
187192 print ("Aborted" )
188193
You can’t perform that action at this time.
0 commit comments