From 938d4b13d34a69f52873ef87dd735d4ba48ffa8b Mon Sep 17 00:00:00 2001 From: Kipp Cannon <kipp.cannon@ligo.org> Date: Sat, 24 Nov 2018 21:07:02 -0800 Subject: [PATCH] pipeparts: improve error message - when plugin cannot be loaded --- gstlal/python/pipeparts/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gstlal/python/pipeparts/__init__.py b/gstlal/python/pipeparts/__init__.py index f518943e1b..1e41450da9 100644 --- a/gstlal/python/pipeparts/__init__.py +++ b/gstlal/python/pipeparts/__init__.py @@ -90,6 +90,8 @@ def mkgeneric(pipeline, src, elem_type_name, **properties): elem = Gst.ElementFactory.make(elem_type_name, properties.pop("name")) else: elem = Gst.ElementFactory.make(elem_type_name, None) + if elem is None: + raise RuntimeError("unknown failure creating \"%s\" element: confirm that the correct plugins are being loaded" % elem_type_name) for name, value in properties.items(): elem.set_property(name.replace("_", "-"), value) pipeline.add(elem) -- GitLab