From 9e9127a60573107238b3eeddceb8709b873ced3f Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Thu, 8 Oct 2020 18:49:59 +0800 Subject: [PATCH] make-xges: don't set the project name if it is not available in metadata.xml Fixes #1 --- make-xges.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make-xges.py b/make-xges.py index f71ec6a..4bfa4de 100755 --- a/make-xges.py +++ b/make-xges.py @@ -136,8 +136,9 @@ def set_track_caps(self): def set_project_metadata(self): doc = ET.parse(os.path.join(self.opts.basedir, 'metadata.xml')) name = doc.find('./meta/name') - self.project.register_meta_string( - GES.MetaFlag.READWRITE, 'name', name.text.strip()) + if name is not None: + self.project.register_meta_string( + GES.MetaFlag.READWRITE, 'name', name.text.strip()) def add_webcams(self): layer = self._add_layer('Camera')