Fix crash
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 20 Nov 2012 21:58:34 +0000 (20 22:58 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 20 Nov 2012 22:03:32 +0000 (20 23:03 +0100)
generate_oly_score.py

index 983a680..b7361d9 100755 (executable)
@@ -480,7 +480,7 @@ def generate_tex_files (settings, lily_files):
 
 
   # Create the tex instruments file only if we have instruments!
-  if set(this_settings["instruments"]) != set(this_settings["noscore_instruments"]):
+  if set(this_settings.get("instruments",[])) != set(this_settings.get("noscore_instruments",[])):
     this_settings = copy.deepcopy (tex_settings);
     this_settings["scoretype"] = "InstrumentalParts";
     tmpopts = this_settings.get ("tex_options", [])