Alex Lourie has posted comments on this change.

Change subject: packaging - fix otopi implementation version locking handling
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File packaging/setup/plugins/ovirt-engine-remove/distro-rpm/versionlock.py
Line 75:         for line in oldcontent.splitlines():
Line 76:             if line.find(osetupcons.Const.ENGINE_PACKAGE_NAME) == -1:
Line 77:                 new_content.append(line)
Line 78: 
Line 79:         self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
If the locking file doesn't exist for some reason until now, it will be created 
here with empty content.

On the other hand, If the complete block is indented into with open() clause, 
then

1. Nothing will be done if lock file doesn't exist
2. Logically it may be a bit more clear that we only do stuff when the lockfile 
is opened.
3. We can spare oldcontent declaration at the beginning.
Line 80:             filetransaction.FileTransaction(
Line 81:                 
name=osetupcons.FileLocations.OVIRT_ENGINE_YUM_VERSIONLOCK,
Line 82:                 owner=self.environment[osetupcons.SystemEnv.USER_ROOT],
Line 83:                 mode=0o644,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1b9142088cfa7def37f6d1ad3d2a4204aebe8ae
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to