Fabian Deutsch has posted comments on this change. Change subject: Config.exists: fix exists method ......................................................................
Patch Set 2: Code-Review-1 (2 comments) https://gerrit.ovirt.org/#/c/44727/2//COMMIT_MSG Commit Message: Line 9: The exists method is used by the persist script Line 10: to check if the file that will be persisted Line 11: exists. However, in commit 9a1986a8 we moved Line 12: from ovirtfunctions.ovirt_store approach and missed Line 13: to update the exists method. I don't see the exists() method in ovirtfunctions. Why is the new semantiocs of the exists() function needed? Line 14: Line 15: Change-Id: If1ba23d67516f1690b223e3dd43985e5d9a502ef Line 16: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1251867 https://gerrit.ovirt.org/#/c/44727/2/src/ovirt/node/utils/fs/__init__.py File src/ovirt/node/utils/fs/__init__.py: Line 676: if filename and self.is_enabled(): Line 677: from ovirtnode import ovirtfunctions Line 678: return ovirtfunctions.ovirt_safe_delete_config(filename) Line 679: Line 680: def exists(self, filename): This change can not be made, because we change the semantics of exists() - we basically break the API. We can either add a new function or add an argument to this one to enable a strict mode i.e.: def exists(self, filename, compare_contents=False) Line 681: """Check if the given file is persisted Line 682: """ Line 683: persisted_path = self._config_path(filename) Line 684: -- To view, visit https://gerrit.ovirt.org/44727 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ba23d67516f1690b223e3dd43985e5d9a502ef Gerrit-PatchSet: 2 Gerrit-Project: ovirt-node Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
