X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fclock_snapshot.py;h=46abdc7856b4c362a39d850e7cdbdfbacaa1449f;hp=89d7a11b5847413fac7209625a767b9cfa6dff5b;hb=d24d56638469189904fb6ddbb3c725817b3e9417;hpb=15caa1ca4fac30bd196602bd136e48fda3892de2 diff --git a/src/bindings/python/bt2/bt2/clock_snapshot.py b/src/bindings/python/bt2/bt2/clock_snapshot.py index 89d7a11b..46abdc78 100644 --- a/src/bindings/python/bt2/bt2/clock_snapshot.py +++ b/src/bindings/python/bt2/bt2/clock_snapshot.py @@ -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):