Python bt2 fix: erroneous imports following split of clock class and value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 16 Sep 2017 02:49:01 +0000 (22:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 16 Sep 2017 02:49:10 +0000 (22:49 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/bt2/Makefile.am
bindings/python/bt2/bt2/clock_class.py
bindings/python/bt2/bt2/clock_value.py
bindings/python/bt2/bt2/event.py
bindings/python/bt2/bt2/notification.py

index d35a3adbc6363719a00d18b2f5f1ea672e2e8b77..f8ae782a9b7cb9100d4ce14b461e6bfaaa3840eb 100644 (file)
@@ -35,6 +35,7 @@ STATIC_BINDINGS_DEPS =                        \
        bt2/native_btversion.i          \
        bt2/clock_class_priority_map.py \
        bt2/clock_class.py              \
+       bt2/clock_value.py              \
        bt2/component.py                \
        bt2/connection.py               \
        bt2/ctf_writer.py               \
index 552ac61da6f515aac7d57ef7d9bc95376342007e..161d365d37fdd181a3df29959f06fd4326ff785e 100644 (file)
@@ -24,7 +24,7 @@ from bt2 import native_bt, object, utils
 import uuid as uuidp
 import numbers
 import bt2
-
+import bt2.clock_value as clock_value
 
 class ClockClassOffset:
     def __init__(self, seconds=0, cycles=0):
@@ -219,5 +219,5 @@ class ClockClass(object._Object):
         utils._handle_ret(ret, "cannot set clock class object's UUID")
 
     def __call__(self, cycles):
-        return _ClockValue(self._ptr, cycles)
+        return clock_value._ClockValue(self._ptr, cycles)
 
index e35bc8ee65ad64ac81ac9c9ee371b3d2c89350f6..d662b96a283b37017b741f9062164133da2ba916 100644 (file)
@@ -45,7 +45,7 @@ class _ClockValue(object._Object):
     def clock_class(self):
         ptr = native_bt.ctf_clock_value_get_class(self._ptr)
         assert(ptr)
-        return ClockClass._create_from_ptr(ptr)
+        return bt2.ClockClass._create_from_ptr(ptr)
 
     @property
     def cycles(self):
index 2e11de087380c6f7fe46436bd2f2c81395cd0e3b..a6f966d0350a340eede26ce63846972f93a57d35 100644 (file)
@@ -25,6 +25,7 @@ import bt2.clock_class
 import bt2.packet
 import bt2.stream
 import bt2.fields
+import bt2.clock_value
 import numbers
 import copy
 import abc
@@ -181,11 +182,11 @@ class _Event(object._Object):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
     def add_clock_value(self, clock_value):
-        utils._check_type(clock_value, bt2.clock_class._ClockValue)
+        utils._check_type(clock_value, bt2.clock_value._ClockValue)
         ret = native_bt.ctf_event_set_clock_value(self._ptr,
                                                   clock_value._ptr)
         utils._handle_ret(ret, "cannot set event object's clock value")
index c144ed4b0d366d9cce97254a4fe095afcae882ea..dab9909e1e0ca1815845260684417b3d626029d8 100644 (file)
@@ -22,6 +22,7 @@
 
 from bt2 import native_bt, object, utils
 import bt2.clock_class_priority_map
+import bt2.clock_value
 import bt2.packet
 import bt2.stream
 import bt2.event
@@ -293,11 +294,11 @@ class InactivityNotification(_CopyableNotification):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
     def add_clock_value(self, clock_value):
-        utils._check_type(clock_value, bt2.clock_class._ClockValue)
+        utils._check_type(clock_value, bt2.clock_value._ClockValue)
         ret = native_bt.notification_inactivity_set_clock_value(self._ptr,
                                                                 clock_value._ptr)
         utils._handle_ret(ret, "cannot set inactivity notification object's clock value")
@@ -416,7 +417,7 @@ class _DiscardedPacketsNotification(_DiscardedElementsNotification):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
     @property
@@ -426,7 +427,7 @@ class _DiscardedPacketsNotification(_DiscardedElementsNotification):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
 
@@ -452,7 +453,7 @@ class _DiscardedEventsNotification(_DiscardedElementsNotification):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
     @property
@@ -462,7 +463,7 @@ class _DiscardedEventsNotification(_DiscardedElementsNotification):
         if clock_value_ptr is None:
             return
 
-        clock_value = bt2.clock_class._create_clock_value_from_ptr(clock_value_ptr)
+        clock_value = bt2.clock_value._create_clock_value_from_ptr(clock_value_ptr)
         return clock_value
 
 
This page took 0.027687 seconds and 4 git commands to generate.