Status: Accepted
Owner: ----
Labels: Type-Scripts OpSys-All Frog
New issue 2044 by [email protected]: convert-ly fails on input with
invalid version string
http://code.google.com/p/lilypond/issues/detail?id=2044
Reported by Werner Lemberg <[email protected]> with subject "convert-ly dies on
invalid input". From the report email:
Consider this (incorrect) input file `p.ly', consisting of a single
line:
\version "2.14."
convert-ly bombs out with
convert-ly (GNU LilyPond) 2.15.15
convert-ly: Processing `p.ly'...
Traceback (most recent call last):
File "/usr/local/bin/convert-ly", line 368, in <module>
main ()
File "/usr/local/bin/convert-ly", line 355, in main
do_one_file (f)
File "/usr/local/bin/convert-ly", line 260, in do_one_file
from_version = str_to_tuple (guess)
File "/usr/local/bin/convert-ly", line 172, in str_to_tuple
return tuple ([int(n) for n in s.split ('.')])
ValueError: invalid literal for int() with base 10: ''
It seems that the split() call in str_to_tuple() produces ['2','14',''] and
int('') throws ValueError. The root cause appears to be that convert-ly.py
fails to trap the malformed version string.
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond