Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Oct 15, 2024
1 parent 5bfbeea commit 91177b7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion servicecatalog_puppet/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ def setup_config(
else:
puppet_account_id_to_use = puppet_account_id
os.environ[environmental_variables.PUPPET_ACCOUNT_ID] = puppet_account_id_to_use
print(f"single_account is {single_account}")
if single_account:
print("I AM SETTING single_account uh oh")
os.environ[environmental_variables.SINGLE_ACCOUNT_ID] = single_account

os.environ[environmental_variables.EXECUTION_MODE] = execution_mode
Expand Down Expand Up @@ -639,8 +641,9 @@ def deploy_from_task_reference(
include_dependencies=subset.get("include_dependencies"),
include_reverse_dependencies=subset.get("include_reverse_dependencies"),
)
single_account = str(overrides.get("single_account")) if overrides.get("single_account") else None
params.update(
dict(single_account=str(overrides.get("single_account")), subset=overrides,)
dict(single_account=single_account, subset=overrides,)
)
click.echo(f"Overridden parameters {params}")

Expand Down
1 change: 1 addition & 0 deletions servicecatalog_puppet/commands/task_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def deploy_from_task_reference(path):

for task_reference, task in all_tasks.items():
if single_account_id: # running single account mode
print("Running in single account mode")
task_section_name = task.get("section_name")
task_account_id = task.get("account_id")
spoke_execution = str(config.get_executor_account_id()) != str(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def worker_task(
for l in serialisation_utils.dump(unwrap(task_details)).split("\n"):
logger.error(l)
for l in traceback.format_exception(
etype=type(e), value=e, tb=e.__traceback__,
e, value=e, tb=e.__traceback__,
):
for sl in l.split("\n"):
logger.error(f"{sl}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def worker_task(
).split("\n"):
logger.error(l)
for l in traceback.format_exception(
etype=type(e), value=e, tb=e.__traceback__,
e, value=e, tb=e.__traceback__,
):
for sl in l.split("\n"):
logger.error(f"{sl}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def on_task_failure(self, exception, duration):
exception_details = {
"exception_type": type(exception),
"exception_stack_trace": traceback.format_exception(
etype=type(exception), value=exception, tb=exception.__traceback__,
exception, value=exception, tb=exception.__traceback__,
),
"duration": duration,
}
Expand Down

0 comments on commit 91177b7

Please sign in to comment.