[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 11:11:26AM -0400, Chris Lumens wrote:
> > isys/isys.py:898: Function return types are inconsistent
> 
> If this were None vs. a dict then it'd be NOTABUG as far as I'm
> concerned.  The addition of whatever devices_prop_iface is means we need
> to ask dcantrell.

I wrote getDeviceProperties to work two ways, which could probably be
corrected to be a little more 'Pythonic', I guess.

If I call getDeviceProperties with dev=None as the parameter, I get a hash of
all NM D-Bus device property interfaces (hash is eth0 = INTERFACE, and so on).

If I call it with dev=STRING such as dev='eth0', I just get that NM D-Bus
device property interface.

Failure to get the property interface or to find the device gives me an empty
hash or None.

What I should probably do is make getAllDeviceProperties() be the hash
returning function and getDeviceProperties() be the single network interface
function.

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

Attachment: pgpQwbgm3srg7.pgp
Description: PGP signature


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