Skip to content

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

Merged
patrickelectric merged 1 commit into
bluerobotics:masterfrom
Williangalvani:uninstall
Oct 21, 2022
Merged

patrickelectric merged 1 commit into
bluerobotics:masterfrom
Williangalvani:uninstall

Conversation

@Williangalvani

Copy link
Copy Markdown
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
15 of 19 tasks
Comment thread core/services/kraken/kraken.py Outdated
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
Copy Markdown
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