From 8dc6af57be65ac6dd94dc57f0436f4954af97329 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Wed, 5 Nov 2008 13:59:35 +0000 Subject: [PATCH] Daniel rightly pointed out that my change to use interface.get('hostname',hostname) instead of an if/then/else on interface['hostname'] was not semantically equivalent. Reverted to the original code for this case. --- source/steps/WriteNetworkConfig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/steps/WriteNetworkConfig.py b/source/steps/WriteNetworkConfig.py index 46ce122..02d93ba 100644 --- a/source/steps/WriteNetworkConfig.py +++ b/source/steps/WriteNetworkConfig.py @@ -175,7 +175,10 @@ def Run( vars, log ): elif interface['method'] == "dhcp": inter['BOOTPROTO'] = "dhcp" - inter['DHCP_HOSTNAME'] = interface.get('hostname',hostname) + if interface['hostname']: + inter['DHCP_HOSTNAME'] = interface['hostname'] + else: + inter['DHCP_HOSTNAME'] = hostname if not interface['is_primary']: inter['DHCLIENTARGS'] = "-R subnet-mask" -- 2.43.0