help with python

Paulo Cavalcanti promac at gmail.com
Wed Feb 25 20:06:16 UTC 2009


On Wed, Feb 25, 2009 at 4:02 PM, Itamar Reis Peixoto <
itamar at ispbrasil.com.br> wrote:

> Anyone Can help to fix this bug with system-config-lvm ?
>
> https://bugzilla.redhat.com/show_bug.cgi?id=466899
>
> is very easy to fix, but I have no skill's with python.
>
>
>
The problem is that the comparison is using floats,
which will fail (1.41.3 > 1.39 --> invalid syntax):

            if (s == 0 or s == 1) and float(e.strip().split()[1]) >= 1.39:
                return (True, cmd)

I think the easiest way, in this case, is using strings:

            if (s == 0 or s == 1) and e.strip().split()[1] >= '1.39':
                return (True, cmd)


-- 
Paulo Roma Cavalcanti
LCG - UFRJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20090225/1db6d347/attachment.htm>


More information about the fedora-devel-list mailing list