X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fconvert-ly.py;h=fd4dc3b8d8affc03d968c79011efc51c8466cbce;hb=6d618ddf527c69dc7c5309f071b115df50566121;hp=cf82b029cfd649a4294e0b0b1dceef1d126bc437;hpb=f5387a5c986393052bc9443ebd9b6cd9f14c6887;p=lilypond.git diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index cf82b029cf..fd4dc3b8d8 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -319,10 +319,13 @@ def main (): do_one_file (f) except UnknownVersion: error (_ ("%s: Unable to determine version. Skipping") % f) - except InvalidVersion as ex: + except InvalidVersion: + # Compat code for 2.x and 3.0 syntax ("except .. as v" doesn't + # work in python 2.4!): + t, v, b = sys.exc_info () error (_ ("%s: Invalid version string `%s' \n" "Valid version strings consist of three numbers, " - "separated by dots, e.g. `2.8.12'") % (f, ex.version) ) + "separated by dots, e.g. `2.8.12'") % (f, v.version) ) sys.stderr.write ('\n')