]> git.donarmstrong.com Git - lilypond.git/commitdiff
Ensure Python 2.4 compatibility in lilypond-book
authorJohn Mandereau <john.mandereau@gmail.com>
Thu, 4 Feb 2010 10:28:44 +0000 (11:28 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Thu, 4 Feb 2010 10:28:44 +0000 (11:28 +0100)
Built-in function "any" is new in Python 2.5.

scripts/lilypond-book.py

index d52e09ad2f2725c201523bd0f783b3a0d8190724..a5832ca99b746c01ff6e0262e5ec069581cd5399 100644 (file)
@@ -1204,8 +1204,10 @@ left-margin-default right-margin-default)"
 
         option_list = []
         for option in self.get_option_list ():
-            if not any (option.startswith (name)
-                        for name in PROCESSING_INDEPENDENT_OPTIONS):
+            for name in PROCESSING_INDEPENDENT_OPTIONS:
+                if option.startswith (name):
+                    break
+            else:
                 option_list.append (option)
         option_string = ','.join (option_list)
         compose_dict = {}