On Fri, 2009-06-12 at 10:36 +0200, A Mennucc wrote: > --- video/videoitem.py.orig 2009-05-16 20:10:55.000000000 +0200 > +++ video/videoitem.py 2009-05-29 11:34:38.000000000 +0200 > @@ -375,6 +375,9 @@ > length = s.length > if not length: > continue > + if type(length) != int: > + _debug_(' length is %s ???' % repr(length), 3) > + continue > total += length
Fails unnecessarily if length is a float. This is more pythonic: try: total += length except TypeError: _debug_('Invalid length: %r' % length, 3) Cheers, Jason. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel