From 817ca54e09713263ba42f488cfd1d41ff747bd0b Mon Sep 17 00:00:00 2001
From: Patrice Lacouture <p.lacouture@see.fr>
Date: Wed, 25 Jan 2023 17:18:17 +0100
Subject: [PATCH] virtinstall: Fix --location and --cloud-init conflict

So far, --cloud-init is ignored when --location is specified.

Resolves: virt-manager#469
---
 ...rt-install-location-iso-and-cloud-init.xml | 172 ++++++++++++++++++
 tests/test_cli.py                             |   1 +
 virtinst/install/installer.py                 |   2 +-
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 tests/data/cli/compare/virt-install-location-iso-and-cloud-init.xml

diff --git a/virtinst/install/installer.py b/virtinst/install/installer.py
index df74eaffa..7b20295ad 100644
--- a/virtinst/install/installer.py
+++ b/virtinst/install/installer.py
@@ -393,7 +393,7 @@ def _prepare(self, guest, meter):
         elif unattended_scripts:
             self._prepare_unattended_data(guest, meter, unattended_scripts)
 
-        elif self._cloudinit_data:
+        if self._cloudinit_data:
             self._prepare_cloudinit(guest, meter)
 
     def _cleanup(self, guest):
