Change in vdsm[master]: configfile: sort dict items inserted to config files for con...

mtayer at redhat.com mtayer at redhat.com
Mon Aug 25 10:00:40 UTC 2014


mooli tayer has posted comments on this change.

Change subject: configfile: sort dict items inserted to config files for consistency.
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/31289/5/lib/vdsm/tool/configurators/configfile.py
File lib/vdsm/tool/configurators/configfile.py:

Line 158:         f.write(self._end())
Line 159: 
Line 160:     def _writeEntries(self, f, oldentries):
Line 161:         f.write(self._start())
Line 162:         for key, val in sorted(self._entries.items()):
> no need to drop iteritems() in favour of items() here.
I see.

I think it makes sense to move to items()
AFAIK iteritems() is not supported in python3
and this list should always be small enough.

Would you like to see that as a different patch?
Not at all?
Line 163:             if key not in oldentries:
Line 164:                 f.write("{k}={v}\n".format(k=key, v=val))
Line 165:         f.write(self._end())
Line 166: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7705b046d993cc08eac6b09a6ebba34bd8986620
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list