Fix bug when checking if the default cli application exists (#488)

This commit is contained in:
Cheick Keita
2021-01-29 12:32:17 -08:00
committed by GitHub
parent 0a1021447b
commit cc1c79b27d

View File

@ -328,11 +328,11 @@ class Client:
(password_id, password) = self.create_password(app.object_id) (password_id, password) = self.create_password(app.object_id)
cli_app = client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP) cli_app = list(
client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP)
)
onefuzz_cli_app_uuid = uuid.UUID(ONEFUZZ_CLI_APP) if len(cli_app) == 0:
if not cli_app:
logger.info( logger.info(
"Could not find the default CLI application under the current " "Could not find the default CLI application under the current "
"subscription, creating a new one" "subscription, creating a new one"
@ -346,7 +346,7 @@ class Client:
} }
else: else:
authorize_application(onefuzz_cli_app_uuid, app.app_id) authorize_application(uuid.UUID(ONEFUZZ_CLI_APP), app.app_id)
self.results["client_id"] = app.app_id self.results["client_id"] = app.app_id
self.results["client_secret"] = password self.results["client_secret"] = password