From 03c1d309f7c6d0b1cfebfc0c3b6050b3ec1b370b Mon Sep 17 00:00:00 2001 From: John Ott Date: Wed, 24 Aug 2022 11:21:22 -0700 Subject: [PATCH] Fix using --profile flag to subcommands This flag was broken, since it referenced an unset attribute profile on the parsed options object. --- maas/client/flesh/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maas/client/flesh/__init__.py b/maas/client/flesh/__init__.py index 7c1fa644..335c674b 100644 --- a/maas/client/flesh/__init__.py +++ b/maas/client/flesh/__init__.py @@ -318,7 +318,7 @@ def __init__(self, parser): class OriginCommand(OriginCommandBase): def __call__(self, options): - session = bones.SessionAPI.fromProfileName(options.profile) + session = bones.SessionAPI.fromProfileName(options.profile_name) origin = viscera.Origin(session) return self.execute(origin, options) @@ -328,7 +328,7 @@ def execute(self, origin, options): class OriginTableCommand(OriginCommandBase, TableCommand): def __call__(self, options): - session = bones.SessionAPI.fromProfileName(options.profile) + session = bones.SessionAPI.fromProfileName(options.profile_name) origin = viscera.Origin(session) return self.execute(origin, options, target=options.format)