File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ def enable_service_account(email):
146
146
service .projects ().serviceAccounts ().enable (
147
147
name = 'projects/-/serviceAccounts/' + email ).execute ()
148
148
149
- print ("Disabled service account :" + email )
149
+ print ("Enabled service account :" + email )
150
150
# [END iam_enable_service_account]
151
151
152
152
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ def test_service_accounts(capsys):
40
40
try :
41
41
service_accounts .delete_service_account (unique_id )
42
42
except HttpError as e :
43
- # When the service account doesn't exist, the service returns 403.
44
- if '403' in str (e ):
45
- print ("Ignoring 403 error upon cleanup." )
43
+ # We've recently seen 404 error too.
44
+ # It used to return 403, so we keep it too.
45
+ if '403' in str (e ) or '404' in str (e ):
46
+ print ("Ignoring 404/403 error upon cleanup." )
46
47
else :
47
48
raise
You can’t perform that action at this time.
0 commit comments