X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fclock_snapshot.py;h=5c53fdd7087798457b40d05b1afa3b16cd46b6ea;hb=cfbd7cf3bde05e8a6606478889dcd663604ef7b5;hp=89d7a11b5847413fac7209625a767b9cfa6dff5b;hpb=c6af194f4d5f4478fbd14a019e41cff93f9c207e;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/clock_snapshot.py b/src/bindings/python/bt2/bt2/clock_snapshot.py index 89d7a11b..5c53fdd7 100644 --- a/src/bindings/python/bt2/bt2/clock_snapshot.py +++ b/src/bindings/python/bt2/bt2/clock_snapshot.py @@ -40,11 +40,10 @@ 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 +61,3 @@ class _ClockSnapshot(object._UniqueObject): class _UnknownClockSnapshot: pass - - -class _InfiniteClockSnapshot: - pass