From 8172f0671a9486e2f1601b90bdc2b58dadcae43a Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Wed, 18 Sep 2019 17:23:54 -0700 Subject: [PATCH] Porting PR #51954 to 2019.2.1 --- salt/modules/linux_lvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/linux_lvm.py b/salt/modules/linux_lvm.py index 003d6c0b066f..3fe497c8b89f 100644 --- a/salt/modules/linux_lvm.py +++ b/salt/modules/linux_lvm.py @@ -230,7 +230,7 @@ def pvcreate(devices, override=True, **kwargs): for device in devices: if not os.path.exists(device): raise CommandExecutionError('{0} does not exist'.format(device)) - if not pvdisplay(device): + if not pvdisplay(device, quiet=True): cmd.append(device) elif not override: raise CommandExecutionError('Device "{0}" is already an LVM physical volume.'.format(device)) @@ -295,7 +295,7 @@ def pvremove(devices, override=True): # Verify pvcremove was successful for device in devices: - if pvdisplay(device): + if pvdisplay(device, quiet=True): raise CommandExecutionError('Device "{0}" was not affected.'.format(device)) return True