From 5de07b7b91cab37e6d54a52556ffe2cb61b9eb42 Mon Sep 17 00:00:00 2001 From: Urs Liska Date: Thu, 17 Nov 2016 17:57:54 +0100 Subject: [PATCH] MusicXML export: Insert check against empty "sections" list I don't know what this code actually is about, but adding this check made a file compile that before caused a traceback because of trying to pop from an empty list. --- ly/musicxml/ly2xml_mediator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ly/musicxml/ly2xml_mediator.py b/ly/musicxml/ly2xml_mediator.py index a9ec6951..381ba521 100644 --- a/ly/musicxml/ly2xml_mediator.py +++ b/ly/musicxml/ly2xml_mediator.py @@ -290,7 +290,10 @@ def check_simultan(self): self.part.merge_voice(self.sections[-1]) elif len(self.sections)>1: self.sections[-2].merge_voice(self.sections[-1]) - self.sections.pop() + + print("\n\nAchtung, sections: {}\n\n".format(self.sections)) + if (len(self.sections) > 0): + self.sections.pop() def check_score(self): """