mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-12 18:18:08 +00:00
Fix bug when checking if the default cli application exists (#488)
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user