[PATCH] Unpack property value returned by GDBus before using it (#956614)

Vratislav Podzimek vpodzime at redhat.com
Thu Apr 25 11:48:14 UTC 2013


On Thu, 2013-04-25 at 13:33 +0200, Radek Vykydal wrote:
> This is the root cause of the BZ.
> ---
>  pyanaconda/nm.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
> index c1717a7..55e1a7f 100644
> --- a/pyanaconda/nm.py
> +++ b/pyanaconda/nm.py
> @@ -125,7 +125,7 @@ def nm_activated_devices():
>      for ac in active_connections:
>          proxy = _get_proxy(object_path=ac, interface_name="org.freedesktop.NetworkManager.Connection.Active")
>          state = proxy.get_cached_property("State")
> -        if state != NetworkManager.ActiveConnectionState.ACTIVATED:
> +        if not state or state.unpack() != NetworkManager.ActiveConnectionState.ACTIVATED:
>              continue
>          devices = proxy.get_cached_property("Devices")
>          if not devices:
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list