bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert-ly dies on invalid input


From: Colin Hall
Subject: Re: convert-ly dies on invalid input
Date: Thu, 17 Nov 2011 23:45:15 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Werner,

Thanks for the bug report.

On Wed, Nov 16, 2011 at 05:46:55PM +0100, Werner LEMBERG wrote:
> 
> Consider this (incorrect) input file `p.ly', consisting of a single
> line:
> 
>   \version "2.14."
> 
> convert-ly bombs out with
>     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 ValueEror.

Root cause is that convert-ly.py fails to trap the malformed version string.

I'll enter is as a bug.

Cheers,
Colin.

-- 

Colin Hall



reply via email to

[Prev in Thread] Current Thread [Next in Thread]