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

Re: Left over master branch pychecker warnings



On Wed, Oct 29, 2008 at 05:13:57PM +0100, Hans de Goede wrote:
> Hi all,
>
> <note rearranging the order of things a bit to but similar warnings together>
>
> Chris Lumens wrote:
>>> autopart.py:201: Using integer division (start / 1024) may return integer or float
>>
>>> iw/lvm_dialog_gui.py:91: Using integer division (pesize / 1024) may  
>>> return integer or float
>> Probably worth fixing just to be absolutely correct.
>>
>
> Ok, call me a python newbie (I am) so how do I fix those, by using a cast 
> like in C ?

Wrap the whole expression in float() or int(), depending on which we want.

>>> iscsi.py:319: string.atoi is deprecated
>>> iw/lvm_dialog_gui.py:282: string.atoi is deprecated
>>
>> Again, worth fixing for correctness I suppose.
>>
>
> Jeremy disagrees, so what will it be, I can easily disabel all deprecated 
> warnings using --no-deprecated

Why keep using atoi()?

>>> network.py:697: Using is not , may not always work
>>
>> 'is not' should probably be '!=' here.
>>
>
> Shall I fix that then or should we wait for dcantrell?

It should be !=, I corrected it.

-- 
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

Attachment: pgpPgXxnXbuVN.pgp
Description: PGP signature


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