From 7806e217efecdd97e8fc1237c60fcf4b27de9975 Mon Sep 17 00:00:00 2001 From: jpic Date: Sat, 15 Feb 2020 17:01:52 +0100 Subject: [PATCH] Fix buildah clean --- shlax/targets/buildah.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shlax/targets/buildah.py b/shlax/targets/buildah.py index 203bc23..69c68ca 100644 --- a/shlax/targets/buildah.py +++ b/shlax/targets/buildah.py @@ -136,6 +136,7 @@ class Buildah(Localhost): cli.exit_code = await proc.wait() async def clean(self, *args, **kwargs): - #await self.umounts() - #await self.umount() - await self.exec('buildah', 'rm', self.ctr, raises=False, buildah=False) + if self.mnt: + await self.exec('buildah', 'umount', self.ctr, buildah=False) + if self.ctr: + await self.exec('buildah', 'rm', self.ctr, buildah=False)