[reportlab-users] Patch to reportlab/lib/units.py

Robin Becker robin at reportlab.com
Thu Feb 17 03:44:04 EST 2005


Paul McNett wrote:
> Hi,
> 
> I tried to find the appropriate place to submit patches to, but failed. 
> Anyway, this fixes a small slicing problem in units.py:
> 
> Index: units.py
> ===================================================================
> --- units.py    (revision 2523)
> +++ units.py    (working copy)
> @@ -17,7 +17,7 @@
>          if s[-2:]=='pt': return float(s[:-2])
>          if s[-1:]=='i': return float(s[:-1])*inch
>          if s[-2:]=='mm': return float(s[:-2])*mm
> -        if s[-4:]=='pica': return float(s[:-2])*pica
> +        if s[-4:]=='pica': return float(s[:-4])*pica
>          return float(s)
>      except:
> -        raise ValueError, "Can't convert '%s' to length" % s
> \ No newline at end of file
> +        raise ValueError, "Can't convert '%s' to length" % s
> 
>

good patch in the right place thanks

-- 
Robin Becker


More information about the reportlab-users mailing list