From: Jérémie Galarneau Date: Wed, 17 Feb 2016 03:27:21 +0000 (-0500) Subject: Python bindings: missing error check in Clock precision setter X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=81cb73c357fd868c22eaec05650dcc575b9238b2;p=deliverable%2Fbabeltrace.git Python bindings: missing error check in Clock precision setter Signed-off-by: Jérémie Galarneau --- diff --git a/bindings/python/writer.py b/bindings/python/writer.py index b419a2711..dc65b2438 100644 --- a/bindings/python/writer.py +++ b/bindings/python/writer.py @@ -158,6 +158,9 @@ class Clock: def precision(self, precision): ret = nbt._bt_ctf_clock_set_precision(self._c, precision) + if ret < 0: + raise ValueError("Invalid precision value.") + @property def offset_seconds(self): """