]> sigrok.org Git - libsigrok.git/commitdiff
python: fix setting device/probe group configuration.
authorMartin Ling <redacted>
Mon, 16 Dec 2013 18:09:57 +0000 (18:09 +0000)
committerBert Vermeulen <redacted>
Tue, 17 Dec 2013 01:00:09 +0000 (02:00 +0100)
bindings/python/sigrok/core/classes.py

index b2347b494e916d0da1a314e0944eca906e13d0b3..2d998ac9c632823dadcdd0bdfd2880280c338eb6 100644 (file)
@@ -155,7 +155,7 @@ class Device(object):
         data = new_gvariant_ptr_ptr()
         try:
             check(sr_config_get(self.driver.struct, self.struct, None,
-                key, data))
+                key.id, data))
         except Error as error:
             if error.errno == SR_ERR_NA:
                 raise NotImplementedError(
@@ -171,7 +171,7 @@ class Device(object):
         except AttributeError:
             super(Device, self).__setattr__(name, value)
             return
-        check(sr_config_set(self.struct, None, key, python_to_gvariant(value)))
+        check(sr_config_set(self.struct, None, key.id, python_to_gvariant(value)))
 
     @property
     def vendor(self):
@@ -242,7 +242,7 @@ class ProbeGroup(object):
         data = new_gvariant_ptr_ptr()
         try:
             check(sr_config_get(self.device.driver.struct, self.device.struct,
-                self.struct, key, data))
+                self.struct, key.id, data))
         except Error as error:
             if error.errno == SR_ERR_NA:
                 raise NotImplementedError(
@@ -259,7 +259,7 @@ class ProbeGroup(object):
             super(ProbeGroup, self).__setattr__(name, value)
             return
         check(sr_config_set(self.device.struct, self.struct,
-            key, python_to_gvariant(value)))
+            key.id, python_to_gvariant(value)))
 
     @property
     def name(self):