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(
34
34
return raw_data
35
35
36
36
def _input_scopes ():
37
- return _select_options ([
37
+ scopes = _select_options ([
38
38
"https://graph.microsoft.com/.default" ,
39
39
"https://management.azure.com/.default" ,
40
40
"User.Read" ,
41
41
"User.ReadBasic.All" ,
42
42
],
43
43
header = "Select a scope (multiple scopes can only be input by manually typing them, delimited by space):" ,
44
44
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
46
49
47
50
def _select_account (app ):
48
51
accounts = app .get_accounts ()
@@ -183,6 +186,8 @@ def main():
183
186
], option_renderer = lambda f : f .__doc__ , header = "MSAL Python APIs:" )
184
187
try :
185
188
func (app )
189
+ except ValueError as e :
190
+ logging .error ("Invalid input: %s" , e )
186
191
except KeyboardInterrupt : # Useful for bailing out a stuck interactive flow
187
192
print ("Aborted" )
188
193
You can’t perform that action at this time.
0 commit comments