def is_raid(self):
        """Tests whether this image (was) part of a RAID array. Requires :command:`mdadm` to be installed."""

        if not _util.command_exists('mdadm'):
            logger.info("mdadm not installed, could not detect RAID")
            return False

        # Scan for new lvm volumes
        # noinspection PyBroadException
        try:
            result = _util.check_output_(["mdadm", "--examine", self.get_raw_path()], stderr=subprocess.STDOUT)
            for l in result.splitlines():
                if l in 'Raid Level':
                    logger.debug("Detected RAID level " + l[l.index(':') + 2:])
                    break
            else:
                return False
        except Exception:
            return False

        return True
dataset/ETHPy150Open ralphje/imagemounter/imagemounter/disk.py/Disk.is_raid/swapped operands of `in`