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

Re: help with python





On Wed, Feb 25, 2009 at 4:02 PM, Itamar Reis Peixoto <itamar 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

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