No subject


Fri Mar 9 18:53:36 UTC 2012


Line 69:                                                             tokens[4:])}
For readability I would make a members variable prior to using it.

Line 77:                   {})
This seems somewhat complex and hard to wrap my head around. I'd use a generator:

 for line int out:
     yield dict(pair.split('=') for pair in line.strip().split(':'))

Then apply the reduce in the actual parsing.

Line 92:     return _reduceToDict(_makeLvDict, out)
Again, I'd prefer to split it into getLvs and _parseLvs.

Line 106:         if x.has_key(y['LVM2_VG_NAME']):
has_key is deprecated in favor of:

 y['LVM2_VG_NAME'] in x

Line 111:     return _reduceToDict(_makeVgDict, out)
Same deal here about splitting.

Line 126:     return _reduceToDict(_makePvDict, out)
And here.

--
To view, visit http://gerrit.ovirt.org/2808
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd51bec292991f7abdcacf3ba747c9662f660f51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud at kohlvanwijngaarden.nl>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>


More information about the vdsm-patches mailing list