From 81cb73c357fd868c22eaec05650dcc575b9238b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 16 Feb 2016 22:27:21 -0500 Subject: [PATCH] Python bindings: missing error check in Clock precision setter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- bindings/python/writer.py | 3 +++ 1 file changed, 3 insertions(+) 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): """ -- 2.34.1