From 1f384563fd5aa4070cd0b75a6bcaee1648884499 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Thu, 4 Jun 2020 13:21:53 +0200
Subject: [PATCH] Fix passing of arguments when creating dracut arguments for
 FCoE

Resolves: rhbz#1843741

Port of https://github.com/rhinstaller/anaconda/pull/2644
---
 pyanaconda/modules/storage/bootloader/base.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/modules/storage/bootloader/base.py b/pyanaconda/modules/storage/bootloader/base.py
index 9ec3def57..4711513ee 100644
--- a/pyanaconda/modules/storage/bootloader/base.py
+++ b/pyanaconda/modules/storage/bootloader/base.py
@@ -792,19 +792,25 @@ class BootLoader(object):
                     network_args = []
                     ibft = False
                     nic = ""
+                    host_address = dep.host_address or ""
                     if isinstance(dep, blivet.devices.iScsiDiskDevice):
                         if dep.iface == "default" or ":" in dep.iface:
                             node = _get_iscsi_node_from_device(dep)
                             if iscsi_proxy.IsNodeFromIbft(Node.to_structure(node)):
                                 ibft = True
                             else:
-                                nic = iface_for_host_ip(dep.host_address)
+                                nic = iface_for_host_ip(host_address)
                         else:
                             nic = iscsi_proxy.GetInterface(dep.iface)
                     else:
                         nic = dep.nic
                     if nic or ibft:
-                        network_args = network_proxy.GetDracutArguments(nic, dep.host_address, "", ibft)
+                        network_args = network_proxy.GetDracutArguments(
+                            nic,
+                            host_address,
+                            "",
+                            ibft
+                        )
 
                     self.boot_args.update(network_args)
                     self.dracut_args.update(network_args)
-- 
2.23.0

