Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-baird authored and StewartW committed Apr 19, 2024
1 parent e93c3e7 commit 8a59606
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,9 @@ def get_ou_id(self, ou_path, parent_ou_id=None):
parent_ou_id = org_unit["Id"]
break
else:
LOGGER.info(f'No OU found with name {ou} and parent {parent_ou_id}, will create.')
LOGGER.info(
'No OU found with name {%s} and parent {%s}, will create.', ou, parent_ou_id
)
new_ou = self.create_ou(parent_ou_id, ou)
parent_ou_id = new_ou['OrganizationalUnit']['Id']

Expand All @@ -501,9 +503,11 @@ def create_ou(self, parent_ou_id, name):
ParentId=parent_ou_id,
Name=name
)
except:
LOGGER.excpetion(f'Failed to create OU called {name}, with parent {parent_ou_id}')
raise OrganizationsException()
except Exception as exc:
LOGGER.exception(
'Failed to create OU called {%s}, with parent {%s}', name, parent_ou_id
)
raise OrganizationsException() from exc
return ou


Expand Down

0 comments on commit 8a59606

Please sign in to comment.