libnm-util: fix flags for GObject introspection (rh #1255436)
authorJiří Klimeš <jklimes@redhat.com>
Mon, 24 Aug 2015 09:02:34 +0000 (11:02 +0200)
committerJiří Klimeš <jklimes@redhat.com>
Mon, 24 Aug 2015 10:33:12 +0000 (12:33 +0200)
commit75b3107b098cd451226f3227c0ba41d29e13df71
treeb5286ce8b2ef533f2f65a6752c436a211d061d7c
parentcb64067b7affab5656dc16a0d095c87fbff8c4ac
libnm-util: fix flags for GObject introspection (rh #1255436)

Without marking the enumeration as flags, the types will be "enumeration"
instead of "bitfield". And python raises ValueError exception.

Example:
from gi.repository import NMClient, NetworkManager
client = NMClient.Client.new()
for dev in client.get_devices():
    if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
        for ap in dev.get_access_points():
            ap.get_rsn_flags()

raises "ValueError: invalid enum value: 648"

https://bugzilla.redhat.com/show_bug.cgi?id=1255436
libnm-util/NetworkManager.h