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 <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: OndÅ™ej Svoboda <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to