Fix if condition order
@@ -559,9 +559,9 @@ class DiskUtil(object):
self.logger.log("Data volume {0} is mounted from {1}".format(mount_item["dest"], mount_item["src"]))
data_drives_encrypted = False
- if (self.is_os_disk_lvm() and
- self.command_executor.ExecuteInBash('pvdisplay | grep /dev/mapper/osencrypt', suppress_logging=True) == 0 and
- not os.path.exists('/volumes.lvm')):
+ if self.is_os_disk_lvm():
+ grep_result = self.command_executor.ExecuteInBash('pvdisplay | grep /dev/mapper/osencrypt', suppress_logging=True)
+ if grep_result == 0 and not os.path.exists('/volumes.lvm'):
self.logger.log("OS PV is encrypted")
os_drive_encrypted = True
elif mount_item["dest"] == "/" and \
