Skip to content

Commit 4798b26

Browse files
committed
fix linting errors
1 parent 60532cf commit 4798b26

File tree

1 file changed

+8
-4
lines changed
  • src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python

1 file changed

+8
-4
lines changed

src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/organizations.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ def get_ou_id(self, ou_path, parent_ou_id=None):
489489
parent_ou_id = org_unit["Id"]
490490
break
491491
else:
492-
LOGGER.info(f'No OU found with name {ou} and parent {parent_ou_id}, will create.')
492+
LOGGER.info(
493+
'No OU found with name {%s} and parent {%s}, will create.', ou, parent_ou_id
494+
)
493495
new_ou = self.create_ou(parent_ou_id, ou)
494496
parent_ou_id = new_ou['OrganizationalUnit']['Id']
495497

@@ -501,9 +503,11 @@ def create_ou(self, parent_ou_id, name):
501503
ParentId=parent_ou_id,
502504
Name=name
503505
)
504-
except:
505-
LOGGER.excpetion(f'Failed to create OU called {name}, with parent {parent_ou_id}')
506-
raise OrganizationsException()
506+
except Exception as exc:
507+
LOGGER.exception(
508+
'Failed to create OU called {%s}, with parent {%s}', name, parent_ou_id
509+
)
510+
raise OrganizationsException() from exc
507511
return ou
508512

509513

0 commit comments

Comments
 (0)