[rhinstaller/anaconda/pulls/274 master] Fix crash when devices and connections are changing (#1245960)
vpodzime
installerbot-noreply at redhat.com
Tue Aug 11 13:11:24 UTC 2015
> @@ -438,27 +454,36 @@ def add_connection_to_list(self, uuid):
> if self.dev_cfg(uuid=uuid):
> log.debug("network: GUI, not adding connection %s, already in list", uuid)
> return False
> +
> dev_cfg = DeviceConfiguration(con_uuid=uuid)
> +
> if dev_cfg.setting_value("connection", "read-only"):
> log.debug("network: GUI, not adding read-only connection %s", uuid)
> return False
> if dev_cfg.device_type not in self.supported_device_types:
> log.debug("network: GUI, not adding connection %s of unsupported type", uuid)
> return False
> - # Configs for ethernet has been already added,
> - # this must be some slave
> + # skip slaves - only slaves have master
> if dev_cfg.device_type == NetworkManager.DeviceType.ETHERNET:
> - log.debug("network: GUI, not adding slave connection %s", uuid)
> - return False
> + if dev_cfg.setting_value("connection", "master"):
> + log.debug("network: GUI, not adding slave connection %s", uuid)
> + return False
> # Wireless settings are handled in scope of its device's dev_cfg
> if dev_cfg.device_type == NetworkManager.DeviceType.WIFI:
> log.debug("network: GUI, not adding wireless connection %s", uuid)
> return False
> +
> self.add_dev_cfg(dev_cfg)
> log.debug("network: GUI, adding connection %s", uuid)
> return True
>
> def initialize(self):
> + # There is a signal for newly added devices from NetworkManager but it
> + # is registered after the initialize method.
> + # So if someone adds a new device in the Welcome screen the ifconf file won't
*...the ifcfg file...* not *ifconf file* I believe.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/274#discussion_r36742203
More information about the anaconda-patches
mailing list