X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/4ac5dd2fbf53b59ad441ca84d892c17f42c580f4..fab975b54ae510b692291e5c5f699245d23f55ce:/src/minwii/musicxml.py diff --git a/src/minwii/musicxml.py b/src/minwii/musicxml.py index 0ed7085..d7651b2 100755 --- a/src/minwii/musicxml.py +++ b/src/minwii/musicxml.py @@ -83,7 +83,13 @@ class Part(object) : previous.addDuration(note) continue else : - previous.addDuration(note) + try : + previous.addDuration(note) + except AttributeError : + # can occur if part starts with a rest. + if previous is not None : + # something else is wrong. + raise continue previous = note