[rhinstaller/anaconda/pulls/274 master] Fix crash when devices and connections are changing (#1245960)

bcl installerbot-noreply at redhat.com
Wed Aug 5 00:14:53 UTC 2015


> @@ -438,27 +443,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
> -        if dev_cfg.device_type == NetworkManager.DeviceType.ETHERNET:
> +        # skip slaves - only slaves has master
> +        if (dev_cfg.device_type == NetworkManager.DeviceType.ETHERNET
> +           and 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 signal for newly added devices from NetworkManager but this
> +        # is registered after the initialize method.
> +        # So if someone add new device in Welcome screen ifconf file won't

'adds a new device in the Welcome screen the ifconf'

-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/274#discussion_r36257920


More information about the anaconda-patches mailing list