[PATCH rhel7-branch] network: fix device configuration in text mode (#1091434)

Brian C. Lane bcl at redhat.com
Fri Apr 25 16:53:53 UTC 2014


On Fri, Apr 25, 2014 at 05:15:41PM +0200, Radek Vykydal wrote:
> Resolves: rhbz#1091434
> 
> This is caused by commit 31b7dfbe5969c9d35daa5579361ea66e0fb2f6d2.
> We want to update all settings, not only the last one in the loop.
> ---
>  pyanaconda/nm.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
> index bc73cde..cd30442 100644
> --- a/pyanaconda/nm.py
> +++ b/pyanaconda/nm.py
> @@ -771,9 +771,13 @@ def _update_settings(settings_path, new_values):
>                                 DEFAULT_DBUS_TIMEOUT,
>                                 None)
>      for key1, key2, value, default_type_str in new_values:
> -        new_settings = _gvariant_settings(settings, key1, key2, value, default_type_str)
> +        settings = _gvariant_settings(settings, key1, key2, value, default_type_str)
>  
> -    proxy.Update(settings.get_type_string(), new_settings)
> +    proxy.call_sync("Update",
> +                    settings,
> +                    Gio.DBusCallFlags.NONE,
> +                    DEFAULT_DBUS_TIMEOUT,
> +                    None)
>  
>  def _gvariant_settings(settings, updated_key1, updated_key2, value, default_type_str=None):
>      """Update setting of updated_key1, updated_key2 of settings object with value.
> @@ -823,7 +827,7 @@ def _gvariant_settings(settings, updated_key1, updated_key2, value, default_type
>              new_settings[updated_key1] = {}
>          new_settings[updated_key1][updated_key2] = GLib.Variant(type_str, value)
>  
> -    return new_settings
> +    return GLib.Variant(settings.get_type_string(), (new_settings,))
>  
>  def nm_ipv6_to_dbus_ay(address):
>      """Convert ipv6 address from string to list of bytes (ay) for dbus."""
> -- 
> 1.7.11.7

Looks good to me.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list