Explicitly mention `black` in CodingStyle guidelines
[babeltrace.git] / src / bindings / python / bt2 / bt2 / clock_snapshot.py
index 89d7a11b5847413fac7209625a767b9cfa6dff5b..adf03e3938623794d4e1abd6a5c95d2a95f129d8 100644 (file)
@@ -40,11 +40,9 @@ class _ClockSnapshot(object._UniqueObject):
 
     @property
     def ns_from_origin(self):
-        ret, ns = native_bt.clock_snapshot_get_ns_from_origin(self._ptr)
-
-        if ret == native_bt.CLOCK_SNAPSHOT_STATUS_OVERFLOW:
-            raise OverflowError("cannot get clock snapshot's nanoseconds from origin")
-
+        status, ns = native_bt.clock_snapshot_get_ns_from_origin(self._ptr)
+        utils._handle_func_status(status,
+                                  "cannot get clock snapshot's nanoseconds from origin")
         return ns
 
     def __eq__(self, other):
@@ -62,7 +60,3 @@ class _ClockSnapshot(object._UniqueObject):
 
 class _UnknownClockSnapshot:
     pass
-
-
-class _InfiniteClockSnapshot:
-    pass
This page took 0.024822 seconds and 4 git commands to generate.