Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: services: kraken: properly cleanup when uninstalling an extension #1197

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

Williangalvani
Copy link
Member

No description provided.

@Williangalvani Williangalvani marked this pull request as draft October 21, 2022 14:20
@Williangalvani Williangalvani marked this pull request as ready for review October 21, 2022 14:26
@Williangalvani Williangalvani mentioned this pull request Oct 21, 2022
19 tasks
async def remove(self, container_name: str) -> None:
logger.info(f"Removing container {container_name}")
container = await self.client.containers.list(filters={"name": {container_name: True}}) # type: ignore
if container:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should deal with the error before the main logic of the code, warning about it and avoiding the extra indentation level

if not container:
     raise ContainerDoesNotExist

@patrickelectric patrickelectric merged commit 05d8490 into bluerobotics:master Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants