From: Marc Fiuczynski Date: Wed, 5 Nov 2008 13:59:35 +0000 (+0000) Subject: Daniel rightly pointed out that my change to use X-Git-Tag: BootManager-4.3-2~15 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8dc6af57be65ac6dd94dc57f0436f4954af97329;p=bootmanager.git 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. --- 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"