File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -85,23 +85,22 @@ def inner(options):
85
85
api_key = accounts .list_api_keys (filter = {
86
86
'key' : getenv ("MBED_CLOUD_SDK_API_KEY" )
87
87
}).next ()
88
- user = accounts .get_user (api_key .owner_id )
89
88
certificates_owned = list (certs .list_certificates ())
90
89
dev_cert_info = None
91
90
for certif in certificates_owned :
92
- if certif .type == "developer" and (certif .owner_id == user . id or
91
+ if certif .type == "developer" and (certif .owner_id == api_key . owner_id or
93
92
certif .owner_id == api_key .id ):
94
93
dev_cert_info = certs .get_certificate (certif .id )
95
- LOG .info ("Found developer certificate onwed by %s named %s" ,
96
- user . full_name , dev_cert_info .name )
94
+ LOG .info ("Found developer certificate named %s" ,
95
+ dev_cert_info .name )
97
96
break
98
97
else :
99
98
LOG .warning (
100
99
"Could not find developer certificate for this account."
101
100
" Generting a new developer certificate."
102
101
)
103
102
dev_cert_info = CertificatesAPI ().add_developer_certificate (
104
- "mbed-cli-auto {}" .format (user . full_name ),
103
+ "mbed-cli-auto {}" .format (api_key . name ),
105
104
description = "cetificate auto-generated by Mbed CLI"
106
105
)
107
106
LOG .info ("Writing developer certificate %s into c file "
You can’t perform that action at this time.
0 commit comments