From eff5fee3f42941b49c3fde0e6051b49fbeb8ce1b Mon Sep 17 00:00:00 2001 From: gorgobacka Date: Wed, 27 Mar 2019 22:34:48 +0100 Subject: [PATCH] use self.eject Signed-off-by: gorgobacka --- whipper/command/cd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whipper/command/cd.py b/whipper/command/cd.py index f32c115..d8dad42 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -186,7 +186,8 @@ class _CD(BaseCommand): self.doCommand() - if self.options.eject in ('success', 'always'): + if (self.options.eject == 'success' and self.eject or + self.options.eject == 'always'): utils.eject_device(self.device) return None