When you get a chance could you try the second python program as well?
I had a hunch the first one would fail, if the second one works that
suggests a possible solution.
Diane
> > --- nmtest.py ----
> > #!/usr/bin/python
> >
> > import gi
> > gi.require_version('NM', '1.0')
> > from gi.repository import NM
> >
> > client = NM.Client().new()
> > print('Manager running? %s' % (client.get_nm_running(),))
> > ------ end --------
>
> I do not have time to try both ideas today. I'll see that tomorrow.
>
> In the meantime, here is the output of your two programs:
>
> dldt@emt-g1:~$ export LC_ALL=C
> dldt@emt-g1:~$ ./nmclient_test.py
>
> (process:2162): libnm-glib-WARNING **:
> (libnm-glib/nm-object.c:179):constructor: code should not be reached
> ./nmclient_test.py:7: Warning: object NMClient 0x55af46e17100
> finalized
> while still in-construction
> client = NMClient.Client().new()
> ./nmclient_test.py:7: Warning: Custom constructor for class NMClient
> returned NULL (which is invalid). Please use GInitable instead.
> client = NMClient.Client().new()
> ./nmclient_test.py:7: Warning: g_object_is_floating: assertion
> 'G_IS_OBJECT (object)' failed
> client = NMClient.Client().new()
> Segmentation fault
> dldt@emt-g1:~$ ./nmtest.py
> Traceback (most recent call last):
> File "./nmtest.py", line 7, in <module>
> client = NM.Client().new()
> GLib.Error: g-io-error-quark: Could not connect: No such file or
> directory (1)
>
>